diff options
author | Dan Allan <dallan@bnl.gov> | 2019-07-13 16:17:48 -0500 |
---|---|---|
committer | Dan Allan <dallan@bnl.gov> | 2019-07-13 16:17:48 -0500 |
commit | 6533fc3c834c555f4df675ac3b21508e11d36e3e (patch) | |
tree | 81c57e275fa3e0e58b911dd3b25c6c4df64e6d8a /doc/source/reference | |
parent | 1f2e169f050532914b0870033253508243966e8b (diff) | |
download | numpy-6533fc3c834c555f4df675ac3b21508e11d36e3e.tar.gz |
rephrase
Diffstat (limited to 'doc/source/reference')
-rw-r--r-- | doc/source/reference/arrays.classes.rst | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/source/reference/arrays.classes.rst b/doc/source/reference/arrays.classes.rst index b3f24439f..76d77a6a5 100644 --- a/doc/source/reference/arrays.classes.rst +++ b/doc/source/reference/arrays.classes.rst @@ -8,8 +8,12 @@ Standard array subclasses The :class:`ndarray` in NumPy is a "new-style" Python built-in-type. Therefore, it can be inherited from (in Python or in C) -if desired. Therefore, it can form a foundation for many useful -classes. Often whether to sub-class the array object or to simply use +if desired. If your goal is to create an array with *modified* behavior, +as do dask arrays for distributed computation and cupy arrays for GPU-based +computation, subclassing is discouraged. Instead, using numpy's +:ref:`dispatch mechanism <dispatch_mechanism>`_ is recommended. + +Often whether to sub-class the array object or to simply use the core array component as an internal part of a new class is a difficult decision, and can be simply a matter of choice. NumPy has several tools for simplifying how your new object interacts with other |