
On Sun, Jun 2, 2019 at 3:18 AM Marten van Kerkwijk < m.h.vankerkwijk@gmail.com> wrote:
Our API is huge. A simple count:
main namespace: 600 fft: 30 linalg: 30 random: 60 ndarray: 70 lib: 20 lib.npyio: 35 etc. (many more ill-thought out but not clearly private submodules)
I would perhaps start with ndarray itself. Quite a lot seems superfluous
Shapes: - need: shape, strides, reshape, transpose; - probably: ndim, size, T - less so: nbytes, ravel, flatten, squeeze, and swapaxes.
Getting/setting: - need __getitem__, __setitem__; - less so: fill, put, take, item, itemset, repeat, compress, diagonal;
Datatype/Copies/views/conversion - need: dtype, copy, view, astype, flags - less so: ctypes, dump, dumps, getfield, setfield, itemsize, byteswap, newbyteorder, resize, setflags, tobytes, tofile, tolist, tostring,
Iteration - need __iter__ - less so: flat
Numerics - need: conj, real, imag - maybe also: min, max, mean, sum, std, var, prod, partition, sort, tracet; - less so: the arg* ones, cumsum, cumprod, clip, round, dot, all, any, nonzero, ptp, searchsorted, choose.
Exactly. This is great, thanks Marten. I agree with pretty much everything in this list. Ralf