[Numpy-discussion] New GitHub issue UI

2025-01-14 Thread Nathan via NumPy-Discussion
Hi all, GitHub is rolling out the new UI for issues, which includes a lot of new opportunities to reorganize our backlog. More detail on the changelog blog: https://github.blog/changelog/2025-01-13-evolving-github-issues-public-preview/ In particular, there is now much richer support for tracking

[Numpy-discussion] New feature

2024-04-17 Thread Alexei Lisitsa
I created an extension to numpy called numpy_list that allows to create numpy array from predefined lists for now it supports arithmetic and geometric progressions You can see info there https://github.com/alessionuovo/mionumpy/tree/list_operations/numpy_extensions#readme Thanks Alexei

[Numpy-discussion] New DType and ArrayMethod C APIs are public

2024-02-14 Thread Nathan
Hi all, Today we merged the PR that publicly exposed the formerly "experimental" DType API and ArrayMethod API. See https://github.com/numpy/numpy/pull/25754. The docs for the new C API are here: https://numpy.org/devdocs/reference/c-api/array.html#arraymethod-api https://numpy.org/devdocs/refe

[Numpy-discussion] New matvec and vecmat functions

2024-01-23 Thread Marten van Kerkwijk
Hi All, I have a PR [1] that adds `np.matvec` and `np.vecmat` gufuncs for matrix-vector and vector-matrix calculations, to add to plain matrix-matrix multiplication with `np.matmul` and the inner vector product with `np.vecdot`. They call BLAS where possible for speed. I'd like to hear whether th

[Numpy-discussion] New Ruff rule for migrating to NumPy 2.0

2024-01-11 Thread Mateusz Sokol
Hi all! Some time ago we added a new rule to Ruff linter, "NPY201", which updates the codebase to a NumPy 2.0 compatible version. You can read about it in the migration guide: https://numpy.org/devdocs/numpy_2_0_migration_guide.html#ruff-plugin And on the Ruff docs website: https://docs.astral

[Numpy-discussion] *New Time* Next Documentation team meeting

2023-10-09 Thread Mukulika Pahari
Hi all, sorry for the late notice. Our next Documentation Team meeting will happen on *Monday, October 9* at *11PM UTC*. If this time slot is inconvenient for you to join, please let me know in the replies or Slack and we will try to add another time slot. All are welcome - you don't need to al

[Numpy-discussion] New user dtypes and the buffer protocol

2023-07-06 Thread Nathan
Hi all, As you may know, I'm currently working on a variable-width string dtype using the new experimental user dtype API. As part of this work I'm running into papercuts that future dtype authors will likely hit and I've been trying to fix them as I go. One issue I'd like to raise with the list

[Numpy-discussion] new time for community meetings

2022-11-14 Thread Inessa Pawson
It’s that time of the year again when some of us have to adjust our clocks. The fun doesn’t stop there as we have to adjust our work schedules too. Let’s see if we can find a new time slot on Wednesday for bi-weekly NumPy community meetings that works for everyone: http://whenisgood.net/numpy-commu

[Numpy-discussion] New API for testing custom array containers

2022-11-04 Thread Nathan
Hi all, I just opened a PR (https://github.com/numpy/numpy/pull/22533) that makes a minor modification to the numpy API. The PR creates numpy.testing.overrides, which contains some helpers for downstream projects who want to test types that implement __array_function__ and __array_ufunc__. See the

[Numpy-discussion] New feature: binary (arbitrary base) rounding

2022-11-03 Thread Oscar Gustafsson
Hi all, I hope this is the correct way to propose a new feature. https://github.com/numpy/numpy/issues/22522 Currently, the around-function supports rounding to a given number of decimal digits. It is often quite convenient to be able to round to a given number of binary digits to mimic fixed-poi

[Numpy-discussion] New methods exposing UFunc dtype resolution/promotion and internals

2022-10-25 Thread Sebastian Berg
Hi all, I would like to expose more of the ufunc internals in the following PR: https://github.com/numpy/numpy/pull/22422/ There are three new proposed functions. I hope the first one can be generally useful while the last two are very specific (and thus underscored), but will hopefully bec

[Numpy-discussion] new proposed NumPy Newcomers' Hour schedule

2022-10-08 Thread Inessa Pawson
I’m considering alternating the NumPy Newcomers’ Hour start time between 12:00 UTC and 20:00 UTC to better accommodate our contributors from every part of the world. Please share your thoughts on the proposed. -- Cheers, Inessa Inessa Pawson Contributor Experience Lead | NumPy https://numpy.org/

[Numpy-discussion] New stable documentation

2022-05-20 Thread Charles R Harris
Hi All, I've put up new stable documentation for NumPy 1.22.4. I'd appreciate it if those familiar with how they want the documentation to look could take a look at it so that fixes can be made while I'm still in the documentation state. Chuck ___ NumPy

[Numpy-discussion] New experimental DType example (for physical Unit handling)

2022-01-27 Thread Sebastian Berg
Hi all, I have created a new prototype showcasing the new experimental DType and ufunc API here: https://github.com/seberg/unitdtype Aside from showing Units, this is also a good resource to get an idea of how the new (including very complicated) DTypes will look like, as well as how UFuncs

[Numpy-discussion] New

2021-12-26 Thread Isha Verma
Hello I am new to NumPy and I would like to contribute. Can someone please help me with the ways I can contribute ! ___ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-le...@python.org https:/

[Numpy-discussion] new time for community meetings

2021-11-10 Thread Inessa Pawson
It’s that time of the year again when most of us have to adjust our clocks. For some of us the fun doesn’t stop there as we have to adjust our work schedules too. Let’s see if we can find a new time slot on Wednesday for bi-weekly NumPy community meetings that works for everyone: http://whenisgood.

[Numpy-discussion] new searchable mailing list archives

2021-09-21 Thread Ralf Gommers
Hi all, Thanks to the friendly folks who maintain the python.org mailing lists, we now have nice searchable mailing list archives for NumPy and SciPy: https://mail.python.org/archives/list/numpy-discussion@python.org/ https://mail.python.org/archives/list/scipy-...@python.org/ https://mail.python

Re: [Numpy-discussion] New CZI grant to support DEI initiatives in the scientific Python ecosystem

2021-09-02 Thread Ralf Gommers
On Tue, Aug 31, 2021 at 7:28 PM Melissa Mendonça wrote: > We are happy to announce the Chan Zuckerberg Initiative has awarded a > grant to support the onboarding, inclusion, and retention of people from > historically marginalized groups on scientific Python projects, and to > structurally improv

[Numpy-discussion] New CZI grant to support DEI initiatives in the scientific Python ecosystem

2021-08-31 Thread Melissa Mendonça
We are happy to announce the Chan Zuckerberg Initiative has awarded a grant to support the onboarding, inclusion, and retention of people from historically marginalized groups on scientific Python projects, and to structurally improve the community dynamics for NumPy, SciPy, Matplotlib, and Pandas.

Re: [Numpy-discussion] New Feature added to rotate MeshGrid

2021-08-31 Thread Ralf Gommers
On Tue, Aug 31, 2021 at 12:07 PM Yash Tewatia wrote: > Hi, it is my first contribution to the open-source community, I have tried > to fix issue #19315, which is to add a new feature of rotating mesh grid in > NumPy. It would be great if I get improvements and suggestions for it. > Hi Yash, welc

[Numpy-discussion] New Feature added to rotate MeshGrid

2021-08-31 Thread Yash Tewatia
Hi, it is my first contribution to the open-source community, I have tried to fix issue #19315, which is to add a new feature of rotating mesh grid in NumPy. It would be great if I get improvements and suggestions for it. Added functionality of rotating mesh grid which fixes #19315 issue, adds a f

Re: [Numpy-discussion] New package to speed up ufunc inner loops

2020-11-04 Thread Robert Kern
On Wed, Nov 4, 2020 at 7:22 PM Aaron Meurer wrote: > > > That's not to say that there isn't clearer language that could be > drafted. The NEP is still in Draft stage. But if you think it could be > clearer, please propose specific edits to the draft. Like with unclear > documentation, it's the pe

Re: [Numpy-discussion] New package to speed up ufunc inner loops

2020-11-04 Thread Stefan van der Walt
On Wed, Nov 4, 2020, at 16:21, Aaron Meurer wrote: > But as I noted, this is already off topic for the original discussion > here, and since there's apparently no interest in improving the NEP > wording, I'll drop it. I was trying to understand where, specifically, the language falls short, and w

Re: [Numpy-discussion] New package to speed up ufunc inner loops

2020-11-04 Thread Aaron Meurer
> Misinterpreted in what way? That they would think we have an ability to > enforce the guidelines? We *are* trying to encourage certain behavior here. > If they read it and, our of abundant caution reach out to us, that's a fine > outcome. > What negative outcomes do you foresee? That it is a

Re: [Numpy-discussion] New package to speed up ufunc inner loops

2020-11-04 Thread Robert Kern
On Wed, Nov 4, 2020 at 5:55 PM Aaron Meurer wrote: > On Wed, Nov 4, 2020 at 3:02 PM Robert Kern wrote: > > > > On Wed, Nov 4, 2020 at 4:49 PM Aaron Meurer wrote: > >> > >> I hope this isn't too off topic, but this "fair play" NEP reads like > >> it is a set of additional restrictions on the Num

Re: [Numpy-discussion] New package to speed up ufunc inner loops

2020-11-04 Thread Stefan van der Walt
On Wed, Nov 4, 2020, at 14:54, Aaron Meurer wrote: > Again, *I* understand the purpose of this document, but I think the > way it is currently written it could easily be misinterpreted by > someone else. Misinterpreted in what way? That they would think we have an ability to enforce the guideline

Re: [Numpy-discussion] New package to speed up ufunc inner loops

2020-11-04 Thread Aaron Meurer
On Wed, Nov 4, 2020 at 3:02 PM Robert Kern wrote: > > On Wed, Nov 4, 2020 at 4:49 PM Aaron Meurer wrote: >> >> I hope this isn't too off topic, but this "fair play" NEP reads like >> it is a set of additional restrictions on the NumPy license, which if >> it is, would make NumPy no longer open so

Re: [Numpy-discussion] New package to speed up ufunc inner loops

2020-11-04 Thread Stefan van der Walt
On Wed, Nov 4, 2020, at 13:47, Aaron Meurer wrote: > I hope this isn't too off topic, but this "fair play" NEP reads like > it is a set of additional restrictions on the NumPy license, which if > it is, would make NumPy no longer open source by the OSI definition. I > think the NEP should be much c

Re: [Numpy-discussion] New package to speed up ufunc inner loops

2020-11-04 Thread Sebastian Berg
On Tue, 2020-11-03 at 17:54 +0200, Matti Picus wrote: > Hi. On behalf of Quansight and RTOSHoldings, I would like to > introduce > "pnumpy", a package to speed up NumPy. > > https://quansight.github.io/numpy-threading-extensions/stable/index.html > Nice to see these efforts especially with inte

Re: [Numpy-discussion] New package to speed up ufunc inner loops

2020-11-04 Thread Robert Kern
On Wed, Nov 4, 2020 at 4:49 PM Aaron Meurer wrote: > I hope this isn't too off topic, but this "fair play" NEP reads like > it is a set of additional restrictions on the NumPy license, which if > it is, would make NumPy no longer open source by the OSI definition. I > think the NEP should be much

Re: [Numpy-discussion] New package to speed up ufunc inner loops

2020-11-04 Thread Aaron Meurer
I hope this isn't too off topic, but this "fair play" NEP reads like it is a set of additional restrictions on the NumPy license, which if it is, would make NumPy no longer open source by the OSI definition. I think the NEP should be much clearer that these are requests but not requirements. Aaron

Re: [Numpy-discussion] New package to speed up ufunc inner loops

2020-11-04 Thread Ralf Gommers
On Tue, Nov 3, 2020 at 3:54 PM Matti Picus wrote: > Hi. On behalf of Quansight and RTOSHoldings, I would like to introduce > "pnumpy", a package to speed up NumPy. > > https://quansight.github.io/numpy-threading-extensions/stable/index.html > > > What is in it? > > - use "PyUFunc_ReplaceLoopBySig

[Numpy-discussion] New package to speed up ufunc inner loops

2020-11-03 Thread Matti Picus
Hi. On behalf of Quansight and RTOSHoldings, I would like to introduce "pnumpy", a package to speed up NumPy. https://quansight.github.io/numpy-threading-extensions/stable/index.html What is in it? - use "PyUFunc_ReplaceLoopBySignature" to hook all the UFunc inner loops - When the inner loop

Re: [Numpy-discussion] new function: broadcast_shapes

2020-10-16 Thread Kevin Sheppard
There is at least one custom implementation in `Generator` IIRC, so a formal API addition sounds like a good idea. Kevin On Thu, Oct 15, 2020 at 8:52 PM Stephan Hoyer wrote: > On Thu, Oct 15, 2020 at 11:46 AM Warren Weckesser < > warren.weckes...@gmail.com> wrote: > >> On 10/15/20, Madhulika J

Re: [Numpy-discussion] new function: broadcast_shapes

2020-10-15 Thread Stephan Hoyer
On Thu, Oct 15, 2020 at 11:46 AM Warren Weckesser < warren.weckes...@gmail.com> wrote: > On 10/15/20, Madhulika Jain Chambers wrote: > > Hello all, > > > > I opened a PR to add a function which returns the broadcasted shape from > a > > given set of shapes: > > https://github.com/numpy/numpy/pull

Re: [Numpy-discussion] new function: broadcast_shapes

2020-10-15 Thread Warren Weckesser
On 10/15/20, Madhulika Jain Chambers wrote: > Hello all, > > I opened a PR to add a function which returns the broadcasted shape from a > given set of shapes: > https://github.com/numpy/numpy/pull/17535 > > As this is a proposed change to the API, I wanted to see if there was any > feedback from t

[Numpy-discussion] new function: broadcast_shapes

2020-10-15 Thread Madhulika Jain Chambers
Hello all, I opened a PR to add a function which returns the broadcasted shape from a given set of shapes: https://github.com/numpy/numpy/pull/17535 As this is a proposed change to the API, I wanted to see if there was any feedback from the list. Thanks so much, Madhulika __

Re: [Numpy-discussion] New random.Generator method: permuted

2020-08-05 Thread Sebastian Berg
On Mon, 2020-08-03 at 14:09 -0400, Warren Weckesser wrote: > In one of the previous weekly zoom meetings, it was suggested > to ping the mailing list about an updated PR that implements > the `permuted` method for the Generator class in numpy.random. > The relevant issue is > > https://github.

[Numpy-discussion] New random.Generator method: permuted

2020-08-03 Thread Warren Weckesser
In one of the previous weekly zoom meetings, it was suggested to ping the mailing list about an updated PR that implements the `permuted` method for the Generator class in numpy.random. The relevant issue is https://github.com/numpy/numpy/issues/5173 and the PR is https://github.com/nump

Re: [Numpy-discussion] new NumPy logo design - cast your vote!

2020-06-25 Thread Ralf Gommers
On Thu, Jun 25, 2020 at 2:27 AM Inessa Pawson wrote: > One of the most discussed and commented issues in the recent history of > NumPy is about to be closed. Don’t forget to cast your vote via reaction on > the new NumPy logo design by this Friday, June 26th. > Thanks Inessa! Here are the three

[Numpy-discussion] new NumPy logo design - cast your vote!

2020-06-24 Thread Inessa Pawson
One of the most discussed and commented issues in the recent history of NumPy is about to be closed. Don’t forget to cast your vote via reaction on the new NumPy logo design by this Friday, June 26th. Here are the three candidates: https://github.com/numpy/numpy.org/issues/326 https://github.com/nu

Re: [Numpy-discussion] new numpy.org is live

2020-05-26 Thread Peter Wang
The new site looks really, really nice. Thank you all for your hard work on this. I think this will serve the community well for a long time to come! -Peter ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/l

Re: [Numpy-discussion] new numpy.org is live

2020-05-25 Thread Travis Oliphant
This is so excellent! What a wonderful upgrade to the web-page. Thank you for all the hard work and effort! -Travis On Sun, May 24, 2020 at 7:12 AM Inessa Pawson wrote: > The NumPy web team is excited to announce the launch of the newly > redesigned numpy.org. To transform the website into a

Re: [Numpy-discussion] new numpy.org is live

2020-05-25 Thread Ralf Gommers
On Sun, May 24, 2020 at 8:19 PM Stephen Waterbury wrote: > This is an absolutely beautiful and very informative site! > It is clear all the work and thought that went into it. > > So please take the following input as a constructive suggestion > from an outsider -- I am a long-time (30-year) Pyth

Re: [Numpy-discussion] new numpy.org is live

2020-05-25 Thread kikocorreoso
Hi all, Great job!! Congratulations. In the "Ecosystem" -> "Scientific Domains" section, I think the links for "bayesian inference" and "bio informatics" are wrong. The ones in "bayesian inference" should appear in "bio informatics" and vice versa. Also, in the "geographic processing" area app

Re: [Numpy-discussion] new numpy.org is live

2020-05-24 Thread Abdur-Rahmaan Janhangeer
More than awesome, now i feel that the logo is a bit outdated. Kind Regards, Abdur-Rahmaan Janhangeer https://www.github.com/Abdur-RahmaanJ Mauritius sent from gmail client on Android, that's why the signature is so ugly. ___ NumPy-Discussion mailin

Re: [Numpy-discussion] new numpy.org is live

2020-05-24 Thread Mark Harfouche
This looks really great! I love the Ecosystem section at the bottom! Great job emphasising the importance, and the elegance of the library! On Sun, May 24, 2020 at 2:20 PM Stephen Waterbury wrote: > This is an absolutely beautiful and very informative site! > It is clear all the work and thoug

Re: [Numpy-discussion] new numpy.org is live

2020-05-24 Thread Stephen Waterbury
This is an absolutely beautiful and very informative site! It is clear all the work and thought that went into it. So please take the following input as a constructive suggestion from an outsider -- I am a long-time (30-year) Python user, and I follow this list but do not regularly use NumPy ...

Re: [Numpy-discussion] new numpy.org is live

2020-05-24 Thread Warren Weckesser
On 5/24/20, Inessa Pawson wrote: > The NumPy web team is excited to announce the launch of the newly > redesigned numpy.org. To transform the website into a comprehensive, yet > user-centric, resource of all things NumPy was a primary focus of this > months-long effort. We thank Joe LaChance, Ralf

Re: [Numpy-discussion] new numpy.org is live

2020-05-24 Thread Ralf Gommers
On Sun, May 24, 2020 at 2:19 PM Andras Deak wrote: > Dear Inessa, > > The new design looks great, thanks for all the hard work from everyone! > Is there a well-defined channel where we can file potential bug > reports and feature requests for the website? Or do those just go on > the main numpy r

Re: [Numpy-discussion] new numpy.org is live

2020-05-24 Thread Andras Deak
Dear Inessa, The new design looks great, thanks for all the hard work from everyone! Is there a well-defined channel where we can file potential bug reports and feature requests for the website? Or do those just go on the main numpy repo as issues? Regards, András On Sun, May 24, 2020 at 2:11 PM

[Numpy-discussion] new numpy.org is live

2020-05-24 Thread Inessa Pawson
The NumPy web team is excited to announce the launch of the newly redesigned numpy.org. To transform the website into a comprehensive, yet user-centric, resource of all things NumPy was a primary focus of this months-long effort. We thank Joe LaChance, Ralf Gommers, Shaloo Shalini, Shekhar Prasad R

Re: [Numpy-discussion] New DTypes: Are scalars a central concept in NumPy or not?

2020-04-08 Thread Chris Barker
On Wed, Apr 8, 2020 at 1:17 PM Sebastian Berg wrote: > > > > But, backward compatibility aside, could we have ONLY Scalars? > > > Well, it is hard to write functions that work on N-Dimensions > > > (where N > > > can be 0), if the 0-D array does not exist. > > So as a (silly) example, the follo

Re: [Numpy-discussion] New DTypes: Are scalars a central concept in NumPy or not?

2020-04-08 Thread Sebastian Berg
On Wed, 2020-04-08 at 12:37 -0700, Chris Barker wrote: > sorry to have fallen off the numpy grid for a bit, but: > > On Mon, Mar 23, 2020 at 1:37 PM Sebastian Berg < > sebast...@sipsolutions.net> > wrote: > > > On Mon, 2020-03-23 at 11:45 -0700, Chris Barker wrote: > > > But, backward compatibili

Re: [Numpy-discussion] New DTypes: Are scalars a central concept in NumPy or not?

2020-04-08 Thread Chris Barker
sorry to have fallen off the numpy grid for a bit, but: On Mon, Mar 23, 2020 at 1:37 PM Sebastian Berg wrote: > On Mon, 2020-03-23 at 11:45 -0700, Chris Barker wrote: > > But, backward compatibility aside, could we have ONLY Scalars? > > Well, it is hard to write functions that work on N-Dimen

Re: [Numpy-discussion] New DTypes: Are scalars a central concept in NumPy or not?

2020-03-23 Thread Sebastian Berg
On Mon, 2020-03-23 at 11:45 -0700, Chris Barker wrote: > I've always found the duality of zero-d arrays an scalars confusing, > and > I'm sure I'm not alone. > > Having both is just plain weird. I guess so, it is a tricky situation, and I do not really have an answer. > > But, backward compatib

Re: [Numpy-discussion] New DTypes: Are scalars a central concept in NumPy or not?

2020-03-23 Thread Chris Barker
I've always found the duality of zero-d arrays an scalars confusing, and I'm sure I'm not alone. Having both is just plain weird. But, backward compatibility aside, could we have ONLY Scalars? When we index into an array, the dimensionality is reduced by one, so indexing into a 1D array has to g

[Numpy-discussion] New Wednesday Community Meeting Time slot (Current 11:00am California time)

2020-03-20 Thread Sebastian Berg
Hi all, since we are spread out all over the world, we are considering moving the Community meeting time, if you are interested in joining in occasionally, please fill out the doodle: https://doodle.com/poll/p3gik4xxdra93cwt I have currently limited the times to hourly times in the California wo

Re: [Numpy-discussion] New DTypes: Are scalars a central concept in NumPy or not?

2020-02-25 Thread Stefano Miccoli
The fact that `isinstance(np.float64(1), float)` raises the problem that the current implementation of np.float64 scalars breaks the Liskov substitution principle: `sequence_or_array[round(x)]` works if `x` is a float, but breaks down if x is a np.float64. See https://github.com/numpy/numpy/issu

Re: [Numpy-discussion] New DTypes: Are scalars a central concept in NumPy or not?

2020-02-24 Thread Allan Haldane
I have some thoughts on scalars from playing with ndarray ducktypes (__array_function__), eg a MaskedArray ndarray-ducktype, for which I wanted an associated "MaskedScalar" type. In summary, the ways scalars currently work makes ducktyping (duck-scalars) difficult: * numpy scalar types are not

Re: [Numpy-discussion] New DTypes: Are scalars a central concept in NumPy or not?

2020-02-23 Thread Sebastian Berg
On Sat, 2020-02-22 at 13:28 -0800, Nathaniel Smith wrote: > Off the cuff, my intuition is that dtypes will want to be able to > define how scalar indexing works, and let it return objects other > than > arrays. So e.g.: > > - some dtypes might just return a zero-d array > - some dtypes might want

Re: [Numpy-discussion] New DTypes: Are scalars a central concept in NumPy or not?

2020-02-23 Thread Hameer Abbasi
Hi, Sebastian, On 22.02.20, 02:37, "NumPy-Discussion on behalf of Sebastian Berg" wrote: Hi all, When we create new datatypes, we have the option to make new choices for the new datatypes [0] (not the existing ones). The question is: Should every NumPy datatype have a

Re: [Numpy-discussion] New DTypes: Are scalars a central concept in NumPy or not?

2020-02-22 Thread Nathaniel Smith
Off the cuff, my intuition is that dtypes will want to be able to define how scalar indexing works, and let it return objects other than arrays. So e.g.: - some dtypes might just return a zero-d array - some dtypes might want to return some arbitrary domain-appropriate type, like a datetime dtype

Re: [Numpy-discussion] New DTypes: Are scalars a central concept in NumPy or not?

2020-02-22 Thread josef . pktd
On Sat, Feb 22, 2020 at 9:41 AM wrote: > > > On Sat, Feb 22, 2020 at 9:34 AM wrote: > >> not having a hashable tuple conversion would be a strong limitation >> >> a = tuple(np.arange(5)) >> versus >> a = tuple([np.array(i) for i in range(5)]) >> {a:5} >> > > also there is the question of which s

Re: [Numpy-discussion] New DTypes: Are scalars a central concept in NumPy or not?

2020-02-22 Thread josef . pktd
On Sat, Feb 22, 2020 at 9:34 AM wrote: > not having a hashable tuple conversion would be a strong limitation > > a = tuple(np.arange(5)) > versus > a = tuple([np.array(i) for i in range(5)]) > {a:5} > also there is the question of which scalar .item() versus [()] This was used in the old times

Re: [Numpy-discussion] New DTypes: Are scalars a central concept in NumPy or not?

2020-02-22 Thread josef . pktd
not having a hashable tuple conversion would be a strong limitation a = tuple(np.arange(5)) versus a = tuple([np.array(i) for i in range(5)]) {a:5} Josef On Sat, Feb 22, 2020 at 9:28 AM Evgeni Burovski wrote: > Hi Sebastian, > > Just to clarify the difference: > > >>> x = np.float64(42) > >>>

Re: [Numpy-discussion] New DTypes: Are scalars a central concept in NumPy or not?

2020-02-22 Thread Evgeni Burovski
Hi Sebastian, Just to clarify the difference: >>> x = np.float64(42) >>> y = np.array(42, dtype=float) Here `x` is a scalar and `y` is a 0D array, correct? If that's the case, not having the former would be very confusing for users (at least, that would be very confusing to me, FWIW). If anythi

Re: [Numpy-discussion] New DTypes: Are scalars a central concept in NumPy or not?

2020-02-21 Thread Juan Nunez-Iglesias
I personally have always found it weird and annoying to deal with 0-D arrays, so +1 for scalars!* Juan *: admittedly, I have almost no grasp of the underlying NumPy implementation complexities, but I will happily take Sebastian's word that scalars can be consistent with the library. On Fri, 2

[Numpy-discussion] New DTypes: Are scalars a central concept in NumPy or not?

2020-02-21 Thread Sebastian Berg
Hi all, When we create new datatypes, we have the option to make new choices for the new datatypes [0] (not the existing ones). The question is: Should every NumPy datatype have a scalar associated and should operations like indexing return a scalar or a 0-D array? This is in my opinion a comple

Re: [Numpy-discussion] new absolute beginners tutorial merged

2020-01-22 Thread Anne Bonner
Wow Thank you so much for the Twitter love! I am so grateful. Thank you!!! Anne On Wed, Jan 22, 2020 at 8:43 AM Gael Varoquaux < gael.varoqu...@normalesup.org> wrote: > Thanks. Exactly what I needed. I don't know why I did not find it myself > :). > > Cheers, > > Gaël > > On Wed, Jan 22, 202

Re: [Numpy-discussion] new absolute beginners tutorial merged

2020-01-22 Thread Gael Varoquaux
Thanks. Exactly what I needed. I don't know why I did not find it myself :). Cheers, Gaël On Wed, Jan 22, 2020 at 05:02:01PM +0100, Ralf Gommers wrote: > On Wed, Jan 22, 2020 at 1:13 AM Gael Varoquaux > wrote: > Did someone tweet about this, so that I retweet? I'm happy crafting a > tw

Re: [Numpy-discussion] new absolute beginners tutorial merged

2020-01-22 Thread Ralf Gommers
On Wed, Jan 22, 2020 at 1:13 AM Gael Varoquaux < gael.varoqu...@normalesup.org> wrote: > This is great!! > > Did someone tweet about this, so that I retweet? I'm happy crafting a > tweet myself, but I'd rather shine light on someone who deserves the > attention. > Thanks Gael. Here is Anne's twee

Re: [Numpy-discussion] new absolute beginners tutorial merged

2020-01-21 Thread Gael Varoquaux
This is great!! Did someone tweet about this, so that I retweet? I'm happy crafting a tweet myself, but I'd rather shine light on someone who deserves the attention. Thanks a lot to all involved, in the name of the community, Gaël On Tue, Jan 21, 2020 at 03:20:06PM -0800, Anne Bonner wrote: > W

Re: [Numpy-discussion] new absolute beginners tutorial merged

2020-01-21 Thread Anne Bonner
What an exciting day!!! Thank you! ~Anne On Tue, Jan 21, 2020 at 2:20 PM alexander baker wrote: > This looks really helpful, thanks to all those whom took the time to > write. Alex b. > > On 21 Jan 2020, at 19:19, Ralf Gommers wrote: > > Hi all, > > I think this is worth announcing: we have a

Re: [Numpy-discussion] new absolute beginners tutorial merged

2020-01-21 Thread alexander baker
This looks really helpful, thanks to all those whom took the time to write. Alex b. > On 21 Jan 2020, at 19:19, Ralf Gommers wrote: > > Hi all, > > I think this is worth announcing: we have a new tutorial in the user guide > titled "NumPy: the absolute basics for beginners". This was Anne Bon

[Numpy-discussion] new absolute beginners tutorial merged

2020-01-21 Thread Ralf Gommers
Hi all, I think this is worth announcing: we have a new tutorial in the user guide titled "NumPy: the absolute basics for beginners". This was Anne Bonner's Season of Docs project, and it is a big step in the right direction for making are docs more accessible to new users. Up at https://numpy.or

[Numpy-discussion] New draft of NEP 31 — Context-local and global overrides of the NumPy API

2019-10-28 Thread Hameer Abbasi
Hello everyone, I’ve improved upon the content of NEP 31 to make it simpler, and also according to the new NEP template, only part of the NEP is being sent out to the mailing list. For the full nep, please see PR 14793.

Re: [Numpy-discussion] new MaskedArray class

2019-06-24 Thread Stephan Hoyer
On Mon, Jun 24, 2019 at 5:36 PM Marten van Kerkwijk < m.h.vankerkw...@gmail.com> wrote: > > > On Mon, Jun 24, 2019 at 7:21 PM Stephan Hoyer wrote: > >> On Mon, Jun 24, 2019 at 3:56 PM Allan Haldane >> wrote: >> >>> I'm not at all set on that behavior and we can do something else. For >>> now, I

Re: [Numpy-discussion] new MaskedArray class

2019-06-24 Thread Marten van Kerkwijk
On Mon, Jun 24, 2019 at 7:21 PM Stephan Hoyer wrote: > On Mon, Jun 24, 2019 at 3:56 PM Allan Haldane > wrote: > >> I'm not at all set on that behavior and we can do something else. For >> now, I chose this way since it seemed to best match the "IGNORE" mask >> behavior. >> >> The behavior you de

Re: [Numpy-discussion] new MaskedArray class

2019-06-24 Thread Marten van Kerkwijk
Hi Allan, > The alternative solution in my model would be to replace `np.dot` with a > > masked-specific implementation of what `np.dot` is supposed to stand for > > (in your simple example, `np.add.reduce(np.multiply(m, m))` - more > > generally, add relevant `outer` and `axes`). This would be si

Re: [Numpy-discussion] new MaskedArray class

2019-06-24 Thread Stephan Hoyer
On Mon, Jun 24, 2019 at 3:56 PM Allan Haldane wrote: > I'm not at all set on that behavior and we can do something else. For > now, I chose this way since it seemed to best match the "IGNORE" mask > behavior. > > The behavior you described further above where the output row/col would > be masked

Re: [Numpy-discussion] new MaskedArray class

2019-06-24 Thread Allan Haldane
On 6/24/19 3:09 PM, Marten van Kerkwijk wrote: > Hi Allan, > > Thanks for bringing up the noclobber explicitly (and Stephan for asking > for clarification; I was similarly confused). > > It does clarify the difference in mental picture. In mine, the operation > would indeed be guaranteed to be do

Re: [Numpy-discussion] new MaskedArray class

2019-06-24 Thread Charles R Harris
On Mon, Jun 24, 2019 at 3:40 PM Marten van Kerkwijk < m.h.vankerkw...@gmail.com> wrote: > Hi Eric, > > The easiest definitely is for the mask to just propagate, which that even > if just one point is masked, all points in the fft will be masked. > > On the direct point I made, I think it is correc

Re: [Numpy-discussion] new MaskedArray class

2019-06-24 Thread Eric Firing
On 2019/06/24 11:39 AM, Marten van Kerkwijk wrote: Hi Eric, The easiest definitely is for the mask to just propagate, which that even if just one point is masked, all points in the fft will be masked. This is perfectly reasonable, and consistent with what happens with nans, of course. My su

Re: [Numpy-discussion] new MaskedArray class

2019-06-24 Thread Warren Weckesser
On 6/24/19, Marten van Kerkwijk wrote: > Hi Eric, > > The easiest definitely is for the mask to just propagate, which that even > if just one point is masked, all points in the fft will be masked. > > On the direct point I made, I think it is correct that since one can think > of the Fourier trans

Re: [Numpy-discussion] new MaskedArray class

2019-06-24 Thread Marten van Kerkwijk
Hi Eric, The easiest definitely is for the mask to just propagate, which that even if just one point is masked, all points in the fft will be masked. On the direct point I made, I think it is correct that since one can think of the Fourier transform of a sine/cosine fit, then there is a solution

Re: [Numpy-discussion] new MaskedArray class

2019-06-24 Thread Eric Firing
On 2019/06/24 9:09 AM, Marten van Kerkwijk wrote: Another example of a function for which I think my model is not particularly insightful (and for which it is difficult to know what to do generally) is `np.fft.fft`. Since an fft is equivalent to a sine/cosine fits to data points, the answer for

Re: [Numpy-discussion] new MaskedArray class

2019-06-24 Thread Marten van Kerkwijk
Hi Allan, Thanks for bringing up the noclobber explicitly (and Stephan for asking for clarification; I was similarly confused). It does clarify the difference in mental picture. In mine, the operation would indeed be guaranteed to be done on the underlying data, without copy and without `.filled(

Re: [Numpy-discussion] new MaskedArray class

2019-06-24 Thread Allan Haldane
On 6/24/19 12:16 PM, Stephan Hoyer wrote: > On Mon, Jun 24, 2019 at 8:46 AM Allan Haldane > wrote: > >  1. Making a "no-clobber" guarantee on the underlying data > > > Hi Allan -- could kindly clarify what you mean by "no-clobber"? > > Is this referring to al

Re: [Numpy-discussion] new MaskedArray class

2019-06-24 Thread Stephan Hoyer
On Mon, Jun 24, 2019 at 8:46 AM Allan Haldane wrote: > 1. Making a "no-clobber" guarantee on the underlying data > Hi Allan -- could kindly clarify what you mean by "no-clobber"? Is this referring to allowing masked arrays to mutate masked data values in-place, even on apparently non-in-place

Re: [Numpy-discussion] new MaskedArray class

2019-06-24 Thread Allan Haldane
On 6/24/19 11:46 AM, Allan Haldane wrote: > A no-clobber guarantee makes your "iterative mask" example solvable in > an efficient (no-copy) way: > > mask, last_mask = False > while True: > dat_mean = np.mean(MaskedArray(data, mask)) > mask, last_mask = np.abs(data - mask) >

Re: [Numpy-discussion] new MaskedArray class

2019-06-24 Thread Allan Haldane
On 6/23/19 6:58 PM, Eric Wieser wrote: > I think we’d need to consider separately the operation on the mask > and on the data. In my proposal, the data would always do > |np.sum(array, where=~mask)|, while how the mask would propagate > might depend on the mask itself, > > I quite

Re: [Numpy-discussion] new MaskedArray class

2019-06-24 Thread Allan Haldane
On 6/22/19 11:50 AM, Marten van Kerkwijk wrote: > Hi Allan, > > I'm not sure I would go too much by what the old MaskedArray class did. > It indeed made an effort not to overwrite masked values with a new > result, even to the extend of copying back masked input data elements to > the output da

Re: [Numpy-discussion] new MaskedArray class

2019-06-23 Thread Marten van Kerkwijk
Hi Eric, On your other points: I remain unconvinced that Mask classes should behave differently on > different ufuncs. I don’t think np.minimum(ignore_na, b) is any different > to np.add(ignore_na, b) - either both should produce b, or both should > produce ignore_na. I would lean towards produxi

Re: [Numpy-discussion] new MaskedArray class

2019-06-23 Thread Marten van Kerkwijk
Hi Stephan, Eric perhaps explained my concept better than I could! I do agree that, as written, your example would be clearer, but Allan's code and the current MaskedArray code do have not that much semblance to it, and mine even less, as they deal with operators as whole groups. For mine, it ma

Re: [Numpy-discussion] new MaskedArray class

2019-06-23 Thread Eric Wieser
I think we’d need to consider separately the operation on the mask and on the data. In my proposal, the data would always do np.sum(array, where=~mask), while how the mask would propagate might depend on the mask itself, I quite like this idea, and I think Stephan’s strawman design is actually pla

Re: [Numpy-discussion] new MaskedArray class

2019-06-23 Thread Stephan Hoyer
On Sun, Jun 23, 2019 at 11:55 PM Marten van Kerkwijk < m.h.vankerkw...@gmail.com> wrote: > Your proposal would be something like np.sum(array, >> where=np.ones_like(array))? This seems rather verbose for a common >> operation. Perhaps np.sum(array, where=True) would work, making use of >> broadcas

Re: [Numpy-discussion] new MaskedArray class

2019-06-23 Thread Marten van Kerkwijk
Hi Stephan, In slightly changed order: Let me try to make the API issue more concrete. Suppose we have a > MaskedArray with values [1, 2, NA]. How do I get: > 1. The sum ignoring masked values, i.e., 3. > 2. The sum that is tainted by masked values, i.e., NA. > > Here's how this works with existi

Re: [Numpy-discussion] new MaskedArray class

2019-06-23 Thread Stephan Hoyer
On Sun, Jun 23, 2019 at 4:07 PM Marten van Kerkwijk < m.h.vankerkw...@gmail.com> wrote: > - If reductions/aggregations default to skipping missing elements, how is >> it be possible to express "NA propagating" versions, which are also useful, >> if slightly less common? >> > > I have been playing

Re: [Numpy-discussion] new MaskedArray class

2019-06-23 Thread Marten van Kerkwijk
Hi Tom, I think a sensible alternative mental model for the MaskedArray class is >> that all it does is forward any operations to the data it holds and >> separately propagate a mask, >> > > I'm generally on-board with that mental picture, and agree that the > use-case described by Ben (different

  1   2   >