def test_interpolate_input_validation(self):
        """Test input validation in interpolate function."""
        # Test input with less than 3 dimensions
        with self.assertRaises(ValueError):
            interpolate(mx.array(np.zeros((2, 3))), size=4)

        # Test with both size and scale_factor defined
        with self.assertRaises(ValueError):
            interpolate(mx.array(np.zeros((2, 3, 4))), size=8, scale_factor=2)

        # Test with neither size nor scale_factor defined
        with self.assertRaises(ValueError):
            interpolate(mx.array(np.zeros((2, 3, 4))))

        # Test with unsupported dimensions
        with self.assertRaises(ValueError):
            interpolate(mx.array(np.zeros((2, 3, 4, 5))), size=8)
Test input validation in interpolate function.
mlx_audio/tts/tests/test_interpolate.py