[Numpy-discussion] Re: numpy build question

2022-06-15 Thread Sebastian Berg
On Wed, 2022-06-15 at 15:11 +0300, Matti Picus wrote: > > On 14/6/22 18:14, Jesse Peet wrote: > > I am trying to build numpy 1.22.3 in container using a rhel8 host  > > and > > the container being rhel7. > > My version of gcc is 4.8.5-44.   Here is the error I get > > > > RuntimeError: Broken to

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2022-06-14 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, June 15st at 16:00 UTC (9:00am Pacific Time). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issues or

[Numpy-discussion] Re: NEP 50: Promotion rules for Python scalars

2022-06-01 Thread Sebastian Berg
On Wed, 2022-06-01 at 18:37 -0500, Juan Nunez-Iglesias wrote: > > For example, in NumPy: > > > >    np.median(np.float32([1, 2, 3, 4])) > > > > did return a float64 before and will now return a float32.  I > > assume > > because somewhere we write: `(np.float64(3) + np.float32(2)) / 2`. > > Sorr

[Numpy-discussion] API Addition: Polynomial classes now have a "symbol" denoting the variable

2022-06-01 Thread Sebastian Berg
Hi all, just another small API announcement, that I merged: https://github.com/numpy/numpy/pull/16154 which adds `symbol="x"` to the polynomial classes. Ross' more detailed explanation is copied below. Cheers, Sebastian New attribute ``symbol`` added to polynomial classes -

[Numpy-discussion] Small API addition: unique now has `equal_nan=False` keyword argument

2022-06-01 Thread Sebastian Berg
Hi all, this has been discussed before, so mainly a brief announcement that we merged a PR to add the `equal_nan` kwarg to `np.unique`. If set to False, multiple `NaN`s will be reported multiple times (which was the behavior prior to NumPy 1.21). The keyword argument name was chosen to match tha

[Numpy-discussion] Re: NEP 50: Promotion rules for Python scalars

2022-06-01 Thread Sebastian Berg
On Wed, 2022-06-01 at 20:23 +0200, Ralf Gommers wrote: > On Wed, Jun 1, 2022 at 5:51 PM Sebastian Berg > > wrote: > > > > > An important part of moving forward will be assessing the real > > world > > impact.  To start that process, I have created a branch

[Numpy-discussion] NEP 50: Promotion rules for Python scalars

2022-06-01 Thread Sebastian Berg
Hi all, I would like to share the first formal draft of NEP 50: Promotion rules for Python scalars with everyone. The full text can be found here: https://numpy.org/neps/nep-0050-scalar-promotion.html NEP 50 is an attempt to remove value-based casting/promotion. We wish to replace it

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2022-05-30 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, June 1st at 16:00 UTC (9:00am Pacific Time). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issues or

[Numpy-discussion] Re: New stable documentation

2022-05-21 Thread Sebastian Berg
On Sat, 2022-05-21 at 10:33 +0300, matti picus wrote: > On Sat, 21 May 2022 at 08:46, Ralf Gommers > wrote: > > > > > > > On Sat, May 21, 2022 at 3:40 AM Charles R Harris < > > charlesr.har...@gmail.com> wrote: > > > > > Hi All, > > > > > > I've put up new stable documentation for NumPy 1.22.

[Numpy-discussion] Re: ndarray shape permutation

2022-05-17 Thread Sebastian Berg
On Tue, 2022-05-17 at 12:16 +0200, Andras Deak wrote: > On Mon, May 16, 2022, at 17:54, Paul Korir wrote: > > Hellos, > > I would like to propose > > `numpy.ndarray.permute_shape()` > > method to predictably permute the shape of an ndarray. In my > > opinion, > > the current alternatives (`swapax

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2022-05-16 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, May 18th at 16:00 UTC (9:00am Pacific Time). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issues or

[Numpy-discussion] Fixing/changing structured dtype casting safety, promotion, and comparisons

2022-05-11 Thread Sebastian Berg
Hi all, This was probably announced before, but I wanted to mention it again, with https://github.com/numpy/numpy/pull/19226 as the last step the casting safety, promotion, and comparisons of structured (void) dtypes will be updated to fix some bugs and fit better with changes that happened a few

[Numpy-discussion] Re: Automatic formatters for only changed lines

2022-05-08 Thread Sebastian Berg
On Sat, 2022-05-07 at 22:37 -0700, Juan Nunez-Iglesias wrote: > With the caveat that I am just an interested bystander, I would like > to point back to yapf as an alternative. I agree with what has > already been echoed by the majority of the community, that setting > *some* auto-formatter is a hug

[Numpy-discussion] Re: Automatic formatters for only changed lines

2022-05-06 Thread Sebastian Berg
On Thu, 2022-05-05 at 15:32 -0700, Stefan van der Walt wrote: > On Thu, May 5, 2022, at 12:00, Trevor Gross wrote: > > I don't necessarily know that this should be enforced on CI off the > > bat (though in the future it could be), but at least having the > > tool available and easily usable would h

[Numpy-discussion] Re: overhead of numpy scalars

2022-05-04 Thread Sebastian Berg
On Tue, 2022-05-03 at 15:06 +0200, Pieter Eendebak wrote: > Hi everyone, > > Operations such as np.sqrt or np.cos on numpy scalars are much slower > than > operations on an array of size 1 (benchmark below). The reason seems > to be > that a numpy scalar (e.g. np.float64(1.1)) is converted interna

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2022-05-03 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, May 4th at 16:00 UTC (9:00am Pacific Time). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issues or P

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2022-04-04 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, August 6th at 16:00 UTC (9:00am Pacific Time). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issues o

[Numpy-discussion] Re: np.bool_ vs Python bool behavior

2022-03-21 Thread Sebastian Berg
On Wed, 2022-03-16 at 18:14 +, Jacob Reinhold wrote: > Hi Sebastian and Chuck, > > Thanks for the response! (Sorry about the formatting in my original > post, I wasn't familiar with how to display code in this setting). > > I think keeping + as "logical or" and * as "logical and" on np.bool_

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus (NOTE: Earlier for most!)

2022-03-21 Thread Sebastian Berg
Note: The time is earlier than last ones in UTC (so earlier if you did not just switched to daylight-savings time). The reason was not daylight saving time, but happens to coincide... Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, March 9th at 16:00 UTC (9:00am Pac

[Numpy-discussion] Re: np.bool_ vs Python bool behavior

2022-03-13 Thread Sebastian Berg
Hi Jacob, adding to what Chuck mentioned, a few inline comments if you are interested in some gory details. On Sat, 2022-03-12 at 21:40 +, Jacob Reinhold wrote: > A pain point I ran into a while ago was assuming that an np.ndarray > with dtype=np.bool_ would act similarly to the Python built

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2022-03-08 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, March 9th at 17:00 UTC (9:00am Pacific Time). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issues or

[Numpy-discussion] Re: Exposing `from_dlpack` to the main namespace

2022-03-08 Thread Sebastian Berg
On Tue, 2022-03-08 at 08:26 -0800, Stefan van der Walt wrote: > Hi Sebastian, > > On Tue, Mar 8, 2022, at 07:41, Sebastian Berg wrote: > > just a brief note that: > > > > https://github.com/numpy/numpy/pull/21145 > > > > will add `np.from_dlpa

[Numpy-discussion] Exposing `from_dlpack` to the main namespace

2022-03-08 Thread Sebastian Berg
Hi, just a brief note that: https://github.com/numpy/numpy/pull/21145 will add `np.from_dlpack` (to import objects implementing the `__dlpack__` dunder [1]. It was added with an underscore mainly due to unlucky timing, IIRC. There may also be some choices that could be different, but I bel

[Numpy-discussion] Re: NumPy Development Meeting Wednesday - Triage Focus

2022-03-01 Thread Sebastian Berg
Sorry all, this week is community meeting, I had just edited the meeting notes and somehow got it wrong. Inessa already send the correct Community meeting invite (different time!) yesterday :). Cheers, Sebastian On Tue, 2022-03-01 at 13:28 -0800, Sebastian Berg wrote: > Hi all, > &g

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2022-03-01 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, March 2nd at 17:00 UTC (9:00am Pacific Time). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issues or

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2022-02-22 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, February 23rd at 17:00 UTC (9:00am Pacific Time). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issue

[Numpy-discussion] Re: NEP draft for the future behaviour of scalar promotion

2022-02-22 Thread Sebastian Berg
On Tue, 2022-02-22 at 01:43 -0600, Juan Nunez-Iglesias wrote: > > On Tue, 22 Feb 2022, at 1:01 AM, Stefan van der Walt wrote: > > it is easier to explain away `x + 1` behaving oddly over `x[0] + 1` > > behaving oddly > > Is it? I find the two equivalent, honestly. > > > given that we pretend lik

[Numpy-discussion] NEP draft for the future behaviour of scalar promotion

2022-02-21 Thread Sebastian Berg
Hi all, NumPy has awkward behaviour when it comes to promotion with 0-D arrays, and Python scalars. This is both a technical challenge (numpy needs to inspect the values where it shouldn't), as well as surprising for users. Roughly speaking, I have made a proposal under the 3 points: * NumPy sca

[Numpy-discussion] Re: advice for using datetime64 in C binding

2022-02-18 Thread Sebastian Berg
08 +0100, Benoit Gschwind wrote: > > > Hello Sebastian, > > > > > > Thanks for the precision > > > > > > Best regards > > > > > > On Tue, 2022-01-18 at 11:52 -0600, Sebastian Berg wrote: > > > > On Tue,

[Numpy-discussion] Re: Unpacking 0-D object arrays when setting item/filling

2022-02-15 Thread Sebastian Berg
On Tue, 2022-02-15 at 10:21 +0200, Matti Picus wrote: > > On 15/2/22 09:53, Stefan van der Walt wrote: > > On Mon, Feb 14, 2022, at 12:45, Sebastian Berg wrote: > > > But this is currently *not* consistently the case.  I wish to > > > make this > > > cons

[Numpy-discussion] Unpacking 0-D object arrays when setting item/filling

2022-02-14 Thread Sebastian Berg
Hi all, TL;DR: Are there strong opinions on what: arr = np.array([None]) arr[0] = np.array(3) arr.fill(np.array(3)) Should give? Right now NumPy usually stores the 0-D array, I want to make `arr.fill()` consistent, so that is what it would be doing also. **Long discussion:** NumPy

[Numpy-discussion] Poll: Future NumPy behavior when mixing arrays, NumPy scalars, and Python scalars

2022-02-09 Thread Sebastian Berg
Hi all, One issue we have in NumPy is that there is fairly common confusion about operations that mix NumPy arrays and scalars (Python scalars or NumPy scalars). This also adds trickier logic to NumPy it may help both users and the NumPy code complexity if we could move forward with a simplificat

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2022-02-08 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, Feburary 9th at 17:00 UTC (9:00am Pacific Time). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issues

[Numpy-discussion] Changes to `np.loadtxt`

2022-02-08 Thread Sebastian Berg
Hi all, just a brief heads up that: https://github.com/numpy/numpy/pull/20580 is now merged. This moves `np.loadtxt` to C. Mainly making it much faster. There are also some other improvements and changes though: * It now supports `quotechar='"'` to support Excel dialect CSV. * Parsing so

[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] NumPy Development Meeting Wednesday - Triage Focus

2022-01-25 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, January 26th at 17:00 UTC (9:00am Pacific Time). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issues

[Numpy-discussion] Re: exp(NINF) returns underflow error after version 1.20

2022-01-24 Thread Sebastian Berg
On Mon, 2022-01-24 at 19:37 +, Michael Gutteridge wrote: > We have an interesting situation where a test suite that checks the > value of e^-inf is behaving differently depending on Numpy version.  > The minimal test I'm using is: > > #!/usr/bin/env python3 > import numpy as np > np.seterr(und

[Numpy-discussion] Re: Proposal for new function to determine if a float contains an integer

2022-01-24 Thread Sebastian Berg
On Sun, 2022-01-23 at 14:12 -0800, Brock Mendel wrote: > Have any of the numpy devs weighed in on this?  If an efficient > version of > this were available in numpy there is a lot of pandas code I would > enjoy > ripping out. As this is a Python float method, that is an argument for implementing i

[Numpy-discussion] Re: Performance mystery

2022-01-20 Thread Sebastian Berg
t; memory allocation strategies in NumPy and come up with suggestions > for > users. You are probably aware, but Matti and Elias now added the ability to customize array data allocation in NumPy, so it should be straight forward to write a small package/module that tweaks the allocatio

[Numpy-discussion] Re: Performance mystery

2022-01-19 Thread Sebastian Berg
On Wed, 2022-01-19 at 20:49 +0100, Jerome Kieffer wrote: > On Wed, 19 Jan 2022 19:48:32 +0100 > Francesc Alted wrote: > > > What puzzles me is that the timeit loops access `z` data 3*1 > > times, which is plenty of time for doing the allocation (just > > should > > require just a single itera

[Numpy-discussion] Re: Performance mystery

2022-01-19 Thread Sebastian Berg
expert in kernel virtual memory/page management :). Cheers, Sebastian > > > > > > > > On Wed, Jan 19, 2022 at 9:06 AM Sebastian Berg > > > > wrote: > > > > > On Wed, 2022-01-19 at 11:49 +0100, Francesc Alted wrote: > > > > On Wed

[Numpy-discussion] Re: Performance mystery

2022-01-19 Thread Sebastian Berg
On Wed, 2022-01-19 at 11:49 +0100, Francesc Alted wrote: > On Wed, Jan 19, 2022 at 7:33 AM Stefan van der Walt > > wrote: > > > On Tue, Jan 18, 2022, at 21:55, Warren Weckesser wrote: > > > expr = 'z.real**2 + z.imag**2' > > > > > > z = generate_sample(n, rng) > > > > 🤔 If I duplicate the `z =

[Numpy-discussion] Re: advice for using datetime64 in C binding

2022-01-18 Thread Sebastian Berg
> > Best regards > > On Tue, 2022-01-18 at 09:22 -0600, Sebastian Berg wrote: > > On Tue, 2022-01-18 at 14:56 +0100, Benoit Gschwind wrote: > > > Hello, > > > > > > I using the following code: > > > > > > if (PyArray

[Numpy-discussion] Re: advice for using datetime64 in C binding

2022-01-18 Thread Sebastian Berg
On Tue, 2022-01-18 at 14:56 +0100, Benoit Gschwind wrote: > Hello, > > I using the following code: > > if (PyArray_TYPE(arr1) == NPY_DATETIME) { > // Ensure datetime64[ms] > auto tmp = > reinterpret_cast(PyObject_CallMethod(reinterpret_cast > (arr1), "astype", "(s)", "datetime64[m

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2022-01-11 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, January 12th at 17:00 UTC (9:00am Pacific Time). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issues

[Numpy-discussion] Re: Writing an array subclass in a compiled language with proper dispatch

2022-01-10 Thread Sebastian Berg
On Mon, 2022-01-10 at 15:25 -0800, Stephan Hoyer wrote: > There are no C-level APIs for __array_function__ or __array_ufunc__, > so > yes, at a high-level Python methods will be invoked by NumPy. > > That said, NumPy's logic for handling __array_function__ and > __array_ufunc__ methods is written

[Numpy-discussion] NumPy Community Meeting Wednesday

2022-01-04 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday January 5th at 19:00 UTC. Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian ___

[Numpy-discussion] NumPy Community Meeting Wednesday

2021-12-21 Thread Sebastian Berg
Hi all, It is almost holiday for many, so happy holidays everyone! For those still around and busy tomorrow: There will be a NumPy Community meeting Wednesday December 22nd at 19:00 UTC. Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: htt

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2021-12-14 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, December 15th at 17:30 UTC (9:30am Pacific Time). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issue

[Numpy-discussion] Speeding up __array_function__ by moving to C (interest in pushing that forward?)

2021-12-08 Thread Sebastian Berg
Hi all, is anyone interested in digging into speeding up __array_function__? I distracted myself briefly looking into moving (more) of it to C and got up with this: https://github.com/numpy/numpy/compare/main...seberg:faster-array-function The effect seems to be an up to 40% speed improvement f

[Numpy-discussion] NumPy Community Meeting Wednesday -- Later time!

2021-12-07 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday December 8th at 19:00 UTC. Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian PS: 19:00 UTC is 11am Pacific time

[Numpy-discussion] Re: Fwd: ndarray should offer __format__ that can adjust precision

2021-12-03 Thread Sebastian Berg
On Mon, 2021-07-26 at 01:04 -0400, Ivan Gonzalez wrote: > It would be nice to be able to use the Python syntax we already use to > format the precision of floating numbers in numpy: > > > > a = np.array([-np.pi, np.pi]) > > > > print(f"{a:+.2f}") > [-3.14 +3.14] > This is particularly useful when y

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2021-11-30 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, December 1st at 16:30 UTC (8:30am Pacific Time). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issues

[Numpy-discussion] Re: Allow for callable in indexing

2021-11-29 Thread Sebastian Berg

[Numpy-discussion] CANCELLED: NumPy Community Meeting (typically Wednesday's)

2021-11-21 Thread Sebastian Berg
Hi all, There is no Community planned this Wednesday, since I am traveling and a few others who typically attend are also on vacation. Best wishes Sebastian ___ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email

[Numpy-discussion] Re: Code formatters

2021-11-18 Thread Sebastian Berg
> On Mon, Nov 15, 2021 at 2:33 PM Charles R Harris > > wrote: > > > > > > > On Mon, Nov 15, 2021 at 3:02 PM Sebastian Berg > > > > wrote: > > > > > On Mon, 2021-11-15 at 14:28 -0700, Charles R Harris wrote: > > > >

[Numpy-discussion] Re: Putting in `np.ma.ndenumerate` MaskedArray specific ndenumerate

2021-11-17 Thread Sebastian Berg
On Wed, 2021-11-17 at 19:49 +0100, Andras Deak wrote: > On Wed, Nov 17, 2021 at 7:39 PM Sebastian Berg > > wrote: > > > Hi all, > > > > the `np.ndenumerate` does not work well for masked arrays (like > > many > > main namespace functions, it simply ig

[Numpy-discussion] Putting in `np.ma.ndenumerate` MaskedArray specific ndenumerate

2021-11-17 Thread Sebastian Berg
Hi all, the `np.ndenumerate` does not work well for masked arrays (like many main namespace functions, it simply ignores/drops the mask). There is a PR (https://github.com/numpy/numpy/pull/20020) to add a version of it to `np.ma` (masked array specific). And we thought it seemed reasonable and w

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2021-11-17 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, November 17rd at 16:30 UTC (8:30am Pacific Time). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issue

[Numpy-discussion] Re: Code formatters

2021-11-15 Thread Sebastian Berg
On Mon, 2021-11-15 at 14:28 -0700, Charles R Harris wrote: > On Sun, Nov 14, 2021 at 4:28 PM Juan Nunez-Iglesias > > wrote: > > > > https://github.com/jni/skan/blob/74507344b4cd4453cc43b4dbd0b5742fc08eb5a0/.style.yapf > > > > As Stéfan said, fix the knobs (yours might be different), then > >

[Numpy-discussion] Re: Conversion from C-layout to Fortran-layout in Cython

2021-11-10 Thread Sebastian Berg
On Thu, 2021-11-11 at 01:04 +0100, Ilhan Polat wrote: > Hmm not sure I understand the question but this is what I mean by naive > looping, suppose I allocate a scratch register work3, then > > for i in range(n): for j in range(n): work3[j*n+i] = work2[i*n+j] > NumPy does not end up doing anythin

[Numpy-discussion] NumPy Community Meeting Wednesday (For those in the US: end of daylight saving means this is one hour earlier)

2021-11-09 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday November 10th at 16:30 UTC. Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian signature.asc Description: This i

[Numpy-discussion] Re: Make the pickle default protocol 4.

2021-11-08 Thread Sebastian Berg
On Sun, 2021-11-07 at 12:36 -0700, Charles R Harris wrote: > Hi All, > > I'd like to propose making the NumPy default pickle protocol 4, the > same as > the Python 3.8 default. That would have the advantage of supporting > large > pickles. The current default protocol is 2, last the default in > P

[Numpy-discussion] Re: Revert the return of a single NaN for `np.unique` with floating point numbers?

2021-11-08 Thread Sebastian Berg
mers wrote: > > > > > > On Mon, Aug 2, 2021 at 7:49 PM Ralf Gommers > > wrote: > > > > > > > > > On Mon, Aug 2, 2021 at 7:04 PM Sebastian Berg > > > wrote: > > > > Hi all, > > > > > > > > In

[Numpy-discussion] Re: Percentile/Quantile "interpolation" refactor

2021-11-04 Thread Sebastian Berg
On Wed, 2021-10-13 at 10:25 -0500, Sebastian Berg wrote: > Hi all, > > after a long time Abel has helped us and refactored the quantile and > percentile functions' `interpolation` keyword. > This PR is now merged to be included in the upcoming 1.22 release. Please don'

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2021-11-02 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, November 3rd at 16:30 UTC (9:30am Pacific Time). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issues

[Numpy-discussion] Current state of the DType refactor

2021-10-26 Thread Sebastian Berg
Hi all, with the latest changes, NumPy has a completely revised infrastructure for: * Creating a new array from Python objects * Organizing casting (to align almost fully with ufuncs) * Organize the inner-loops and dispatching of ufuncs * Create and "promote" DTypes Which means that the core fun

[Numpy-discussion] NumPy Community Meeting Wednesday

2021-10-26 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday October 27th at 16:30 UTC. Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian signature.asc Description: This is

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2021-10-19 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, October 20th at 16:30 UTC (9:30am Pacific Time). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issues

[Numpy-discussion] Moving triage meeting to the same slot as the community meeting

2021-10-18 Thread Sebastian Berg
Hi all, for simplicity, I suggest to move the triage meeting also by 30 minutes later to 16:30 UTC, sorry for not thinking of that when moving the community meeting. If no one protests I will announce it and change the calendar accordingly tomorrow. Cheers, Sebastian signature.asc Description

[Numpy-discussion] Percentile/Quantile "interpolation" refactor

2021-10-13 Thread Sebastian Berg
Hi all, after a long time Abel has helped us and refactored the quantile and percentile functions' `interpolation` keyword. This was long overdue since NumPy implements three (the non-default) interpolation methods that appear to be very much non-standard. On the other hand, NumPy currently has

[Numpy-discussion] NumPy Community Meeting Wednesday (today @16:30 UTC!)

2021-10-13 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday September 29th at 16:30 UTC. Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian PS: Sorry for the late reminder!

[Numpy-discussion] Re: Documentation Team meeting - Monday October 11

2021-10-11 Thread Sebastian Berg
On Mon, 2021-10-11 at 13:26 -0300, Melissa Mendonça wrote: > Can you try using this link: > https://zoom.us/j/96219574921?pwd=VTRNeGwwOUlrYVNYSENpVVBRRjlkZz09 > The link includes `pwd=...` its a bit annoying, but you can just copy paste the last bit of the link as the password. Although, there sh

[Numpy-discussion] Re: A bite of C++

2021-10-08 Thread Sebastian Berg
is that we have two ways to template C now... I hope that will pay off soon (as in C++ is proofs useful in some way), since it feels like replacing all `c.src` code is a pretty large (although probably doable) endeavor. Cheers, Sebastian > On Thu, Oct 7, 2021 at 3:02 PM Sebastian Berg > >

[Numpy-discussion] Re: A bite of C++

2021-10-07 Thread Sebastian Berg
On Wed, 2021-08-25 at 17:50 -0500, Sebastian Berg wrote: > On Wed, 2021-08-25 at 17:48 +0200, Serge Guelton wrote: > > Hi folks, > > > > https://github.com/numpy/numpy/pull/19713 showcases what *could* be > > a > > first step > > toward getting rid of gen

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2021-10-05 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, October 6th at 9 am Pacific Time (16:00 UTC). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issues or

[Numpy-discussion] Deprecating boolean indices in `partition` and disable negative time unit factors `M8[-1s]`

2021-10-02 Thread Sebastian Berg
Hi all, A brief note that the PR: https://github.com/numpy/numpy/pull/2 deprecated the use of boolean arrays as indices in argpartition (aligning its behaviour with normal indexing). Further: https://github.com/numpy/numpy/pull/19731 silently turns negative time factor indices into errors. Pr

[Numpy-discussion] Re: spam on the mailing lists

2021-10-02 Thread Sebastian Berg
On Wed, 2021-09-29 at 11:07 -0700, Stefan van der Walt wrote: > On Wed, Sep 29, 2021, at 03:02, Ralf Gommers wrote: > > We don't have admin access to the python.org lists, so this is a > > bit of a problem. We have never had a spam problem, so we can ask > > to block this user first. If it continue

[Numpy-discussion] Re: ENH: Extended choose -- add an implementation of the choose function which supports more than 32 choices

2021-09-29 Thread Sebastian Berg
On Wed, 2021-09-29 at 15:09 -0400, Aaron Watters wrote: > Hi folks! > > The np.choose function raises a ValueError if called with more than > 31 > choices. > This PR adds an alternate implementation np.extended_choose (which > uses the > base implementation) that supports any number of choices. >

[Numpy-discussion] NumPy Community Meeting Wednesday (earlier @16:30 UTC!)

2021-09-28 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday September 29th at 16:30 UTC. Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian NOTE: The time is different from

[Numpy-discussion] Re: A bite of C++

2021-09-28 Thread Sebastian Berg
On Wed, 2021-08-25 at 17:48 +0200, Serge Guelton wrote: > Hi folks, > > https://github.com/numpy/numpy/pull/19713 showcases what *could* be a > first step > toward getting rid of generated C code within numpy, in favor of some > C++ code, > coupled with a single macro trick. It seems time to pic

[Numpy-discussion] Re: Moving community meeting to 16:00 UTC

2021-09-28 Thread Sebastian Berg
On Wed, 2021-09-22 at 21:11 +0200, Ralf Gommers wrote: > On Wed, Sep 22, 2021 at 8:31 PM Sebastian Berg < > sebast...@sipsolutions.net> > wrote: > > > Hi all, > > > > Melissa brought up that we should reschedule the bi-weekly > > community > > mee

[Numpy-discussion] Moving community meeting to 16:00 UTC

2021-09-22 Thread Sebastian Berg
Hi all, Melissa brought up that we should reschedule the bi-weekly community meeting to the same time slot at the triage meeting: Wednesdays 16:00 UTC (9 am Pacific time) [1] This will simplify attending for those in Europe and allow a more reasonable time including for India. As of now,

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2021-09-21 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, September 22nd at 9 am Pacific Time (16:00 UTC). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issues

[Numpy-discussion] Re: deprecating float(x) for ndim > 0

2021-09-17 Thread Sebastian Berg
On Thu, 2021-09-16 at 14:39 -0600, Aaron Meurer wrote: > On Thu, Sep 16, 2021 at 12:32 AM Nico Schlömer < > nico.schloe...@gmail.com> wrote: > > > > > I was playing with this though and was a little surprised to find > > > NumPy allows things like this: > > > > > > > > > a = np.array([1, 2, 3])

Re: [Numpy-discussion] deprecating float(x) for ndim > 0

2021-09-15 Thread Sebastian Berg
On Wed, 2021-09-15 at 17:25 +, george trojan wrote: > Responding to the post by nico.schloe...@gmail.com (I subscribe to > the > digest). > > I just wrote the following code: > > twb = scipy.optimize.fsolve(phi, tdb, args=(tdb, p, w, hd_tdb, > hg_tdb), > xtol=1e-8) > tdb, p, w, hd_tdb, hg_tdb

[Numpy-discussion] NumPy Community Meeting Wednesday

2021-09-14 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday September 15th at 20:00 UTC. Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian signature.asc Description: This

Re: [Numpy-discussion] np.trunc is inconsistent with array-api

2021-09-10 Thread Sebastian Berg
On Fri, 2021-09-10 at 14:51 -0600, Aaron Meurer wrote: > On Thu, Sep 9, 2021 at 7:11 PM Sebastian Berg > wrote: > > > > On Sun, 2021-09-05 at 21:08 +0200, Ralf Gommers wrote: > > > On Sat, Sep 4, 2021 at 10:02 AM Kshitij Kalambarkar < > > > kshitijkalambar

Re: [Numpy-discussion] np.trunc is inconsistent with array-api

2021-09-09 Thread Sebastian Berg
On Sun, 2021-09-05 at 21:08 +0200, Ralf Gommers wrote: > On Sat, Sep 4, 2021 at 10:02 AM Kshitij Kalambarkar < > kshitijkalambar...@gmail.com> wrote: > > > Hi, > > > > np.trunc returns floating dtype output even for integral dtype > > input. As > > per array-api, it should preserve the input dtyp

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2021-09-07 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, September 8th at 9 am Pacific Time (16:00 UTC). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issues

Re: [Numpy-discussion] A bite of C++

2021-08-25 Thread Sebastian Berg
On Wed, 2021-08-25 at 17:48 +0200, Serge Guelton wrote: > Hi folks, > > https://github.com/numpy/numpy/pull/19713 showcases what *could* be a > first step > toward getting rid of generated C code within numpy, in favor of some > C++ code, > coupled with a single macro trick. > > Basically, templa

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2021-08-24 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, August 25th at 9 am Pacific Time (16:00 UTC). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issues or

[Numpy-discussion] NumPy Community Meeting Wednesday

2021-08-17 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday August 18th at 20:00 UTC. Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian signature.asc Description: This is

[Numpy-discussion] NumPy Development Meeting Wednesday - Triage Focus

2021-08-10 Thread Sebastian Berg
Hi all, Our bi-weekly triage-focused NumPy development meeting is Wednesday, August 11th at 9 am Pacific Time (16:00 UTC). Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg I encourage everyone to notify us of issues or

[Numpy-discussion] NumPy Community Meeting Wednesday

2021-08-03 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday August 4th at 20:00 UTC. Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian signature.asc Description: This is a

Re: [Numpy-discussion] Proposal for adding bit_count

2021-08-03 Thread Sebastian Berg
On Mon, 2021-08-02 at 13:10 -0700, Stefan van der Walt wrote: > On Mon, Aug 2, 2021, at 10:50, Sebastian Berg wrote: > > * Should `np.ndarray.bit_count()` exist?  I tend against this; > >   but we should have it on (integer) scalars to mirror the > >   Python `int`. >

Re: [Numpy-discussion] Proposal for adding bit_count

2021-08-02 Thread Sebastian Berg
On Thu, 2021-07-29 at 21:46 +0530, Ganesh Kathiresan wrote: > Hi All, > > > > I am working on a new > UFunc, ` > bit_count ` (popcount > in > other languages) that aims to count the number of 1-bits in > th

[Numpy-discussion] Revert the return of a single NaN for `np.unique` with floating point numbers?

2021-08-02 Thread Sebastian Berg
Hi all, In NumPy 1.21, the output of `np.unique` changed in the presence of multiple NaNs. Previously, all NaNs were returned when we now only return one (all NaNs were considered unique): a = np.array([1, 1, np.nan, np.nan, np.nan]) Before 1.21: >>> np.unique(a) array([ 1., nan, n

Re: [Numpy-discussion] Floating point precision expectations in NumPy

2021-07-30 Thread Sebastian Berg
On Fri, 2021-07-30 at 11:04 -0700, Jerry Morrison wrote: > On Tue, Jul 27, 2021 at 4:55 PM Sebastian Berg < > sebast...@sipsolutions.net> > wrote: > > > Hi all, > > > > there is a proposal to add some Intel specific fast math routine to > > NumPy: &

[Numpy-discussion] Floating point precision expectations in NumPy

2021-07-27 Thread Sebastian Berg
Hi all, there is a proposal to add some Intel specific fast math routine to NumPy: https://github.com/numpy/numpy/pull/19478 part of numerical algorithms is that there is always a speed vs. precision trade-off, giving a more precise result is slower. So there is a question what the general

<    1   2   3   4   5   6   7   >