Enum NewSubtypeZeroDim
- Namespace
- NumSharp
- Assembly
- NumSharp.dll
How an ndarray method's 0-d result reaches the caller (NumSharp.NewSubtypeAttribute.ZeroDim): the third argument of __array_finalize__(NDArray, bool, NewSubtypeZeroDim), which a subclass reads to decide whether a 0-d result stays an array of its class or becomes the element it stands for.
public enum NewSubtypeZeroDim
Fields
Array = 0A 0-d result is a 0-d array of the class, like any other rank.
Scalar = 1PyArray_Return: a 0-d result is the NumPy scalar of the element, created as the subclass first (so the finalize rule runs on its dtype) and then converted -ndarray.take's unstrippednp.str_.Element = 2The function ends by INDEXING the operand (
np.flip'sm[indexer]): a 0-d result is what the subclass'sgetitemreturns for an element (a chararray's stripped Pythonstr).
Remarks
Public because the hook it is passed to can be overridden outside NumSharp.dll; a subclass that has no scalar form of its own treats every value as Array.