[Numpy-discussion] Re: Dropping the pdf documentation.

2022-05-23 Thread Feng Yu
Furthermore, the PDF docs of numpy (and maybe scipy) can be stripped to a separate project and put on a separate release cycle, not necessarily tracking the releases. On Mon, May 23, 2022 at 10:37 AM Ralf Gommers wrote: > > > On Mon, May 23, 2022 at 10:21 AM Lev Maximov > wrote: > >> What do yo

Re: [Numpy-discussion] NumPy dtype API improvement suggestion

2020-07-26 Thread Feng Yu
Hi, Would it be possible to also allow a byte offset for the field? e.g., class Point(np.struct): x: np.field('i4', offset=8) y: np.field(' wrote: > Better would be to have an object like NamedTuple in typing that would > allow > > class Point(DType): > x: np.int16 > y: np.int16 > >

Re: [Numpy-discussion] Numpy FFT normalization options issue (addition of new option)

2020-06-23 Thread Feng Yu
' comment, I think we could choose > a > > name based on the fact that the forward transform is now scaled by `n`, > > instead of the backward one as in the default "norm=None". In this case, > > I'd > > suggest "norm=forward", which we can a

Re: [Numpy-discussion] Numpy FFT normalization options issue (addition of new option)

2020-06-07 Thread Feng Yu
Hi, 1. The wikipedia pages of CFT and DFT refer to norm='ortho' as 'unitary'. Since we are in general working with complex numbers, I do suggest unitary over ortho. (https://en.wikipedia.org/wiki/Fourier_transform#Other_conventions) and ( https://en.wikipedia.org/wiki/Discrete_Fourier_transform#Th

Re: [Numpy-discussion] Add guaranteed no-copy to array creation and reshape?

2019-01-13 Thread Feng Yu
ng it as a value passed in via a copy= kwarg, we don’t need to > answer any of those questions. > > Eric > > On Thu, 10 Jan 2019 at 20:28 Ralf Gommers ralf.gomm...@gmail.com > <http://mailto:ralf.gomm...@gmail.com> wrote: > > On Thu, Jan 10, 2019 at 11:21 AM Feng Yu

Re: [Numpy-discussion] Add guaranteed no-copy to array creation and reshape?

2019-01-10 Thread Feng Yu
Mon, Jan 7, 2019, 14:22 Feng Yu >> Hi, >> >> Was it ever brought up the possibility of a new array class (ndrefonly, >> ndview) that is strictly no copy? >> >> All operations on ndrefonly will return ndrefonly and if the operation >> cannot be completed w

Re: [Numpy-discussion] Add guaranteed no-copy to array creation and reshape?

2019-01-07 Thread Feng Yu
Hi, Was it ever brought up the possibility of a new array class (ndrefonly, ndview) that is strictly no copy? All operations on ndrefonly will return ndrefonly and if the operation cannot be completed without making a copy, it shall throw an error. On the implementation there are two choices if

[Numpy-discussion] Helper function for assignment from other structured arrays

2018-09-17 Thread Feng Yu
Hi, Assignment between structured arrays are matching by the order of fields, not by names of fields. Is there a recommended way of assignment by matching field names? I can see one way is to explicitly looping over the names; another possibility is to use the field names of the target array to i

Re: [Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread Feng Yu
An NEP on utility functions for structured array definitely sounds appealing to me. On Thu, Nov 30, 2017 at 2:00 PM, Stefan van der Walt wrote: > On Thu, Nov 30, 2017, at 12:02, Marten van Kerkwijk wrote: >> I think Josef specifically meant `recarrays`, which give access to >> elements of a struc

Re: [Numpy-discussion] NumPy default citation

2017-09-05 Thread Feng Yu
str(numpy.version.citation) and numpy.version.citation.to_bibtex()? On Tue, Sep 5, 2017 at 2:15 PM, Paul Hobson wrote: > Just a thought that popped into my head: > It'd be cool with the sci/py/data stack had a convention of > .citation so I could look it up w/o leaving my jupyter notebook :) > >

Re: [Numpy-discussion] proposal: smaller representation of string arrays

2017-04-20 Thread Feng Yu
I suggest a new data type 'text[encoding]', 'T'. 1. text can be cast to python strings via decoding. 2. Conceptually casting to python bytes first cast to a string then calls encode(); the current encoding in the meta data is used by default, but the new encoding can be overridden. I slightly f