
July 24, 2015
1:03 p.m.
Julian Taylor <jtaylor.debian@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