Julian Taylor <jtaylor.deb...@googlemail.com> wrote:

> I don't see the issue. They are just aliases so how is np.float worse 
> than just float?

I have burned my fingers on it.

Since np.double is a C double I assumed np.float is a C float. It is not.

np.int has the same problem by being a C long. Pure evil. Most users of
NumPy probably expect the np.foobar dtype to map to the corresponding
foobar C type. This is actually inconsistent and plain dangerous.

It would be much better if dtype=float meant Python float, dtype=np.float
meant C float, dtype=int meant Python int, and dtype=np.int meant C int.

Sturla

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to