There is nothing wrong with my numpy. It would be nice if you shared your code, since there is probably an error, since the following works just fine:
import numpy as np from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt x, y = np.array([[np.random.randint(0,20) + np.random.random() for i in xrange(100)] for j in xrange(2)]) z = 112*x/2 + 2**.15*y + 109 fig = plt.figure() ax = fig.add_subplot(111, projection='3d') ax.scatter(x, y, z) ax.set_xlabel('x') ax.set_ylabel('y') ax.set_zlabel('z') plt.show()

As others have noted, the correct way to generate your numbers is:
x, y = np.random.rand(2, 100) * 20
or even
x, y = np.random.randint(20, size=(2, 100)) + np.random.rand(2, 100)
but this does not affect the result.
Jaime source share