diff options
-rw-r--r-- | doc/neps/index.rst.tmpl | 25 | ||||
-rw-r--r-- | doc/neps/roadmap.rst | 115 | ||||
-rw-r--r-- | doc/neps/scope.rst | 46 |
3 files changed, 178 insertions, 8 deletions
diff --git a/doc/neps/index.rst.tmpl b/doc/neps/index.rst.tmpl index 6cbad8eb2..e7b8fedba 100644 --- a/doc/neps/index.rst.tmpl +++ b/doc/neps/index.rst.tmpl @@ -1,12 +1,21 @@ -=========================== -NumPy Enhancement Proposals -=========================== - -NumPy Enhancement Proposals (NEPs) describe proposed changes to NumPy. -NEPs are modeled on Python Enhancement Proposals (PEPs), and are typically -written up when large changes to NumPy are proposed. +===================================== +Roadmap & NumPy Enhancement Proposals +===================================== + +This page provides an overview of development priorities for NumPy. +Specifically, it contains a roadmap with a higher-level overview, as +well as NumPy Enhancement Proposals (NEPs)—suggested changes +to the library—in various stages of discussion or completion (see `NEP +0 <nep-0000>`__). + +Roadmap +------- +.. toctree:: + :maxdepth: 1 -This page provides an overview of all NEPs. + The Scope of NumPy <scope> + Current roadmap <roadmap> + Wish list <https://github.com/numpy/numpy/issues?q=is%3Aopen+is%3Aissue+label%3A%2223+-+Wish+List%22> Meta-NEPs (NEPs about NEPs or Processes) ---------------------------------------- diff --git a/doc/neps/roadmap.rst b/doc/neps/roadmap.rst new file mode 100644 index 000000000..a45423711 --- /dev/null +++ b/doc/neps/roadmap.rst @@ -0,0 +1,115 @@ +============= +NumPy Roadmap +============= + +This is a live snapshot of tasks and features we will be investing resources +in. It may be used to encourage and inspire developers and to search for +funding. + +Interoperability protocols & duck typing +---------------------------------------- + +- `__array_function__` + + See `NEP 18`_ and a sample implementation_ + +- Array Duck-Typing + + `NEP 22`_ `np.asduckarray()` + +- Mixins like `NDArrayOperatorsMixin`: + + - for mutable arrays + - for reduction methods implemented as ufuncs + +Better dtypes +------------- + +- Easier custom dtypes + - Simplify and/or wrap the current C-API + - More consistent support for dtype metadata + - Support for writing a dtype in Python +- New string dtype(s): + - Encoded strings with fixed-width storage (utf8, latin1, ...) and/or + - Variable length strings (could share implementation with dtype=object, but are explicitly type-checked) + - One of these should probably be the default for text data. The current behavior on Python 3 is neither efficient nor user friendly. +- `np.int` should not be platform dependent +- better coercion for string + number + +Random number generation policy & rewrite +----------------------------------------- + +`NEP 19`_ and a `reference implementation`_ + +Indexing +-------- + +vindex/oindex `NEP 21`_ + +Infrastructure +-------------- + +NumPy is much more than just the code base itself, we also maintain +docs, CI, benchmarks, etc. + +- Rewrite numpy.org +- Benchmarking: improve the extent of the existing suite, and run & render + the results as part of the docs or website. + + - Hardware: find a machine that can reliably run serial benchmarks + - ASV produces graphs, could we set up a site? Currently at + https://pv.github.io/numpy-bench/, should that become a community resource? + +Functionality outside core +-------------------------- + +Some things inside NumPy do not actually match the `Scope of NumPy`. + +- A backend system for `numpy.fft` (so that e.g. `fft-mkl` doesn't need to monkeypatch numpy) + +- Rewrite masked arrays to not be a ndarray subclass -- maybe in a separate project? +- MaskedArray as a duck-array type, and/or +- dtypes that support missing values + +- Write a strategy on how to deal with overlap between numpy and scipy for `linalg` and `fft` (and implement it). + +- Deprecate `np.matrix` + +Continuous Integration +---------------------- + +We depend on CI to discover problems as we continue to develop NumPy before the +code reaches downstream users. + +- CI for more exotic platforms (e.g. ARM is now available from + http://www.shippable.com/, but it is not free). +- Multi-package testing +- Add an official channel for numpy dev builds for CI usage by other projects so + they may confirm new builds do not break their package. + +Typing +------ + +Python type annotation syntax should support ndarrays and dtypes. + +- Type annotations for NumPy: github.com/numpy/numpy-stubs +- Support for typing shape and dtype in multi-dimensional arrays in Python more generally + +NumPy scalars +------------- + +Numpy has both scalars and zero-dimensional arrays. + +- The current implementation adds a large maintenance burden -- can we remove + scalars and/or simplify it internally? +- Zero dimensional arrays get converted into scalars by most NumPy + functions (i.e., output of `np.sin(x)` depends on whether `x` is + zero-dimensional or not). This inconsistency should be addressed, + so that one could, e.g., write sane type annotations. + +.. _`NEP 19`: https://www.numpy.org/neps/nep-0019-rng-policy.html +.. _`NEP 22`: http://www.numpy.org/neps/nep-0022-ndarray-duck-typing-overview.html +.. _`NEP 18`: https://www.numpy.org/neps/nep-0018-array-function-protocol.html +.. _implementation: https://gist.github.com/shoyer/1f0a308a06cd96df20879a1ddb8f0006 +.. _`reference implementation`: https://github.com/bashtage/randomgen +.. _`NEP 21`: https://www.numpy.org/neps/nep-0021-advanced-indexing.html diff --git a/doc/neps/scope.rst b/doc/neps/scope.rst new file mode 100644 index 000000000..a675b8c96 --- /dev/null +++ b/doc/neps/scope.rst @@ -0,0 +1,46 @@ +============== +Scope of NumPy +============== + +Here, we describe aspects of N-d array computation that are within scope for NumPy development. This is *not* an aspirational definition of where NumPy should aim, but instead captures the status quo—areas which we have decided to continue supporting, at least for the time being. + +- **In-memory, N-dimensional, homogeneously typed (single pointer + strided) arrays on CPUs** + + - Support for a wide range of data types + - Not specialized hardware such as GPUs + - But, do support wide range of CPUs (e.g. ARM, PowerX) + +- **Higher level APIs for N-dimensional arrays** + + - NumPy is a *de facto* standard for array APIs in Python + - Indexing and fast iteration over elements (ufunc) + - Interoperability protocols with other data container implementations (like `__array_ufunc__`). + +- **Python API and a C API** to the ndarray's methods and attributes. + +- Other **specialized types or uses of N-dimensional arrays**: + + - Masked arrays + - Structured arrays (informally known as record arrays) + - Memory mapped arrays + +- Historically, NumPy has included the following **basic functionality + in support of scientific computation**. We intend to keep supporting + (but not to expand) what is currently included: + + - Linear algebra + - Fast Fourier transforms and windowing + - Pseudo-random number generators + - Polynomial fitting + +- NumPy provides some **infrastructure for other packages in the scientific Python ecosystem**: + + - numpy.distutils (build support for C++, Fortran, BLAS/LAPACK, and other relevant libraries for scientific computing + - f2py (generating bindings for Fortran code) + - testing utilities + +- **Speed**: we take performance concerns seriously and aim to execute + operations on large arrays with similar performance as native C + code. That said, where conflict arises, maintenance and portability take + precedence over performance. We aim to prevent regressions where + possible (e.g., through asv). |