[Numpy-discussion] NEP 41: Is there still need to discuss DTypes vs. Scalars (or DType classes)?
matti.picus at gmail.com
Tue Apr 21 00:48:33 EDT 2020
On 20/4/20 11:37 pm, Sebastian Berg wrote:
> Hi all,
> In my proposal the DType class (i.e. `type(np.dtype("float64")`), is
> the core concept and different for every scalar type. It holds all the
> information on how to deal with array elements.
> This is some duplication of scalar types and it means that there would
> be (usually) exactly one DType for each (NumPy) scalar, possibly
> exposed using:
> e.g. np.dtype[np.float64]
> That does create a certain duality. For each scalar type/class, there
> is a corresponding DType class. And in theory the scalar does not even
> need to know that NumPy has a DType for it.
I think this is the correct choice, As we have only a little time before
the 1.19 release, the refactoring will at the earliest reach users for
1.20. This gives us time to see how the whole refactoring works out, so
the choice can be reevaluated in the future. Without diving into detail,
this is the approach taken in the current version of the NEP, correct?
If so, I suggest we accept the NEP in its current form and publish it
one week from now.
More information about the NumPy-Discussion