Some of your categories here sound like they might be suitable for ABCs that provide mixin methods, which is something I think Hameer suggested in the past. Perhaps it's worth re-exploring that avenue.
Eric On Sat, Jun 1, 2019, 18:18 Marten van Kerkwijk <m.h.vankerkw...@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. > > All the best, > > Marten > _______________________________________________ > NumPy-Discussion mailing list > NumPy-Discussion@python.org > https://mail.python.org/mailman/listinfo/numpy-discussion >
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion