Re: [Numpy-discussion] Deprecate zipf distribution?

2017-10-07 Thread Warren Weckesser
On Sat, Oct 7, 2017 at 11:29 AM, Charles R Harris wrote: > Hi All, > > The current NumPy implementation of the truncated zipf distribution has > several drawbacks. > > >- Extremely poor performance when the parameter `a` is near 1. For >instance, when `a = 1.01` a simple change in the

Re: [Numpy-discussion] ENH: softmax

2018-03-14 Thread Warren Weckesser
On Wed, Mar 14, 2018 at 4:05 AM, Kulick, Johannes wrote: > Hi, > > > > I regularly need the softmax function (https://en.wikipedia.org/ > wiki/Softmax_function) for my code. I have a quite efficient pure python > implementation (credits to Nolan Conaway). I think it would be a valuable > enhancem

Re: [Numpy-discussion] Casting scalars

2018-05-10 Thread Warren Weckesser
On Thu, May 10, 2018 at 10:53 PM, Hameer Abbasi wrote: > Yes, that I know. I meant given a dtype string such as 'uint8' or a > dtype object. I know I can possibly do np.array(scalar, > dtype=dtype)[()] but I was looking for a less hacky method. Apparently the `dtype` object has the attribute `

Re: [Numpy-discussion] NEP: Random Number Generator Policy

2018-06-03 Thread Warren Weckesser
On Sat, Jun 2, 2018 at 3:04 PM, Robert Kern wrote: > As promised distressingly many months ago, I have written up a NEP about > relaxing the stream-compatibility policy that we currently have. > > https://github.com/numpy/numpy/pull/11229 > https://github.com/rkern/numpy/blob/nep/rng/doc/neps/ >

Re: [Numpy-discussion] NEP: Random Number Generator Policy

2018-06-03 Thread Warren Weckesser
On Sun, Jun 3, 2018 at 11:20 PM, Ralf Gommers wrote: > > > On Sun, Jun 3, 2018 at 6:54 PM, wrote: > >> >> >> On Sun, Jun 3, 2018 at 9:08 PM, Robert Kern >> wrote: >> >>> On Sun, Jun 3, 2018 at 5:46 PM wrote: >>> On Sun, Jun 3, 2018 at 8:21 PM, Robert Kern wrote: >

Re: [Numpy-discussion] count_nonzero axis argument?

2018-09-17 Thread Warren Weckesser
On Mon, Sep 17, 2018 at 7:38 AM Matthew Brett wrote: > Hi, > > Is there any reason that np.count_nonzero should not take an axis > argument? As in: > > >>> np.better_count_nonzero([[10, 11], [0, 3]], axis=1) > array([2, 1]) > > It already does (since version 1.12.0): https://docs.scipy.org/doc/

Re: [Numpy-discussion] align `choices` and `sample` with Python `random` module

2018-12-10 Thread Warren Weckesser
On 12/10/18, Ralf Gommers wrote: > On Sun, Dec 9, 2018 at 2:00 PM Alan Isaac wrote: > >> I believe this was proposed in the past to little enthusiasm, >> with the response, "you're using a library; learn its functions". >> > > Not only that, NumPy and the core libraries around it are the standard

Re: [Numpy-discussion] align `choices` and `sample` with Python `random` module

2018-12-11 Thread Warren Weckesser
On Tue, Dec 11, 2018 at 10:32 AM Ralf Gommers wrote: > > > On Mon, Dec 10, 2018 at 10:27 AM Warren Weckesser < > warren.weckes...@gmail.com> wrote: > >> >> >> On 12/10/18, Ralf Gommers wrote: >> > On Sun, Dec 9, 2018 at 2:00 PM Alan Isaac wrot

Re: [Numpy-discussion] align `choices` and `sample` with Python `random` module

2018-12-11 Thread Warren Weckesser
On Tue, Dec 11, 2018 at 1:37 PM Warren Weckesser wrote: > > > On Tue, Dec 11, 2018 at 10:32 AM Ralf Gommers > wrote: > >> >> >> On Mon, Dec 10, 2018 at 10:27 AM Warren Weckesser < >> warren.weckes...@gmail.com> wrote: >> >>> >>&g

Re: [Numpy-discussion] align `choices` and `sample` with Python `random` module

2018-12-11 Thread Warren Weckesser
On Tue, Dec 11, 2018 at 2:27 PM Stephan Hoyer wrote: > On Tue, Dec 11, 2018 at 10:39 AM Warren Weckesser < > warren.weckes...@gmail.com> wrote: > >> There is no bug, just a limitation in the API. >> >> When I draw without replacement, say, three values from a

Re: [Numpy-discussion] #4808 -- let np.pad default to constant

2019-03-13 Thread Warren Weckesser
On 3/13/19, Stefan van der Walt wrote: > In PR 4808, I propose changing the default padding mode (for `np.pad`) > to constant (0). +1 Warren > > It was suggested that I mention the change here, in case someone has a > use case or argument for not making it. > > https://github.com/numpy/numpy/pu

Re: [Numpy-discussion] ANN: SciPy 1.3.0

2019-05-17 Thread Warren Weckesser
* Conner DiPaolo + > * Dowon > * Michael Dunphy + > * Peter Andreas Entschev + > * Gökçen Eraslan + > * Johann Faouzi + > * Yu Feng > * Piotr Figiel + > * Matthew H Flamm > * Franz Forstmayr + > * Christoph Gohlke > * Richard Janis Goldschmidt + > * Ralf Gommers >

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

[Numpy-discussion] NEP 32: Remove the financial functions from NumPy

2019-09-03 Thread Warren Weckesser
en the functions were added to NumPy in 2008. I recommend reviewing those threads before commenting here. Warren - == NEP 32 — Remove the financial functions from NumPy ========== :Author: Warren W

Re: [Numpy-discussion] NEP 32: Remove the financial functions from NumPy

2019-09-08 Thread Warren Weckesser
ebastian Berg >> wrote: >>> >>> On Tue, 2019-09-03 at 08:56 -0400, Warren Weckesser wrote: >>> > Github issue 2880 ("Get financial functions out of main namespace", >>> >>> Very briefly, I am absolutely in favor of this. >>>

Re: [Numpy-discussion] NEP 32: Remove the financial functions from NumPy

2019-09-11 Thread Warren Weckesser
On 9/9/19, D.S. McNeil wrote: > [coming over from the pydata post] > > I just checked about ~150KLOC of our Python code in a financial context, > written by about twenty developers over about four years. Almost every > function uses numpy, sometimes directly and sometimes via pandas. > > It seems

Re: [Numpy-discussion] NEP 32: Remove the financial functions from NumPy

2019-09-11 Thread Warren Weckesser
On 9/3/19, Warren Weckesser wrote: > Github issue 2880 ("Get financial functions out of main namespace", > https://github.com/numpy/numpy/issues/2880) has been open since 2013. In a > recent community meeting, it was suggested that we create a NEP to propose > the re

Re: [Numpy-discussion] Code review for adding axis argument to permutation and shuffle function

2019-09-13 Thread Warren Weckesser
On 7/4/19, Kexuan Sun wrote: > Hi, > > I would like to request a code review. The random.permutation and > random.shuffle functions now can only shuffle along the first axis of a > multi-dimensional array. I propose to add an axis argument for the > functions and allow them to shuffle along a give

[Numpy-discussion] Proposal to accept NEP 32: Remove the financial functions from NumPy

2019-09-19 Thread Warren Weckesser
NEP 32 is available at https://numpy.org/neps/nep-0032-remove-financial-functions.html Recent timeline: - 30-Aug-2019 - A pull request with NEP 32 submitted. - 03-Sep-2019 - Announcement of the NEP 32 pull request on the NumPy-Discussion mailing list, with the text of the NEP included in

Re: [Numpy-discussion] DType Roadmap/NEP Discussion

2019-09-19 Thread Warren Weckesser
On 9/18/19, Sebastian Berg wrote: > Hi all, > > to try and make some progress towards a decision since the broad design > is pretty much settling from my side. I am thinking about making a > meeting, and suggest Monday at 11am Pacific Time (I am open to other > times though). That works for me.

Re: [Numpy-discussion] [pydata] NumPy proposal to remove the financial functions.

2019-09-22 Thread Warren Weckesser
among the NumPy developers, it would be best to continue the conversation in a NumPy venue, either the github issue or the NumPy mailing list. I've cc'ed this email to the NumPy mailing list. Warren > > On Thursday, September 19, 2019 at 8:25:52 AM UTC-7, Warren Weckesser > wrote: &g

[Numpy-discussion] NEP 32 is accepted. Now the work begins...

2019-09-27 Thread Warren Weckesser
NumPy devs, NEP 32 to remove the financial functions (https://numpy.org/neps/nep-0032-remove-financial-functions.html) has been accepted. The next step is to create the numpy-financial package that will replace them. The repository for the new package is https://github.com/numpy/numpy-financial.

Re: [Numpy-discussion] NEP 32 is accepted. Now the work begins...

2019-09-28 Thread Warren Weckesser
On 9/27/19, Warren Weckesser wrote: > NumPy devs, > > NEP 32 to remove the financial functions > (https://numpy.org/neps/nep-0032-remove-financial-functions.html) has > been accepted. CI gurus: the web page containing the rendered NEPs, https://numpy.org/neps/, has not updated

[Numpy-discussion] Forcing gufunc to error with size zero input

2019-09-28 Thread Warren Weckesser
I'm experimenting with gufuncs, and I just created a simple one with signature '(i)->()'. Is there a way to configure the gufunc itself so that an empty array results in an error? Or would I have to create a Python wrapper around the gufunc that does the error checking? Currently, when passed an

Re: [Numpy-discussion] NEP 32 is accepted. Now the work begins...

2019-09-28 Thread Warren Weckesser
On 9/28/19, Sebastian Berg wrote: > On Sat, 2019-09-28 at 13:15 -0400, Warren Weckesser wrote: >> On 9/27/19, Warren Weckesser wrote: >> > NumPy devs, >> > >> > NEP 32 to remove the financial functions >> > (https://numpy.org/neps/nep-0032-remove

Re: [Numpy-discussion] Forcing gufunc to error with size zero input

2019-09-28 Thread Warren Weckesser
ence function just for the case '(i)->()', maybe something like PyUFunc_OneDReduction_FromFuncAndData (ugh, that's ugly, but I think you get the idea), and that function can have an argument to specify that the length must be at least 1. I'll see if that is feasible, but I w

Re: [Numpy-discussion] Forcing gufunc to error with size zero input

2019-09-28 Thread Warren Weckesser
On 9/29/19, Warren Weckesser wrote: > On 9/28/19, Eric Wieser wrote: >> Can you just raise an exception in the gufuncs inner loop? Or is there no >> mechanism to do that today? > > Maybe? I don't know what is the idiomatic way to handle errors > detected in an

[Numpy-discussion] Error handling in a ufunc inner loop.

2019-09-29 Thread Warren Weckesser
This is a new thread to address the question of error handling in a ufunc loop that was brought up in the thread on handling core dimensions of length zero. I'm attempting to answer my own question about the idiomatic way to handle an error in an inner loop. The use of the GIL with a ufunc loop i

Re: [Numpy-discussion] Forcing gufunc to error with size zero input

2019-09-29 Thread Warren Weckesser
On 9/29/19, Warren Weckesser wrote: > On 9/28/19, Eric Wieser wrote: >> Can you just raise an exception in the gufuncs inner loop? Or is there no >> mechanism to do that today? > > Maybe? I don't know what is the idiomatic way to handle errors > detected in an

Re: [Numpy-discussion] Error handling in a ufunc inner loop.

2019-09-29 Thread Warren Weckesser
On 9/29/19, Warren Weckesser wrote: > This is a new thread to address the question of error handling in a ufunc > loop that was brought up in the thread on handling core dimensions of > length zero. I'm attempting to answer my own question about the idiomatic > way to handle an

Re: [Numpy-discussion] State of numpy-financial

2019-11-15 Thread Warren Weckesser
On 11/15/19, Marcelo Gasparian Gosling wrote: > Hi everyone! > > So, np-financial is being phased out of mainline Numpy, right? I have a > patch for the IRR function that I'd like to submit, is it just as easy as > making a PR on Github? Hi Marcelo, The new home for the NumPy financial function

[Numpy-discussion] numpy/windows-wheel-builder repository

2019-12-03 Thread Warren Weckesser
It looks like the repo https://github.com/numpy/windows-wheel-builder is defunct. Could someone with the appropriate access privileges merge Matti's pull request to update README.rst (https://github.com/numpy/windows-wheel-builder/pull/7), and add a one-line description to the main repo page that

Re: [Numpy-discussion] [SciPy-Dev] ANN: SciPy 1.4.0

2019-12-16 Thread Warren Weckesser
Gina Helfrich + > * Alex Henrie + > * Francisco J. Hernandez Heras + > * Andreas Hilboll > * Lindsey Hiltner > * Thomas Hisch > * Min ho Kim + > * Gert-Ludwig Ingold > * jakobjakobson13 + > * Todd Jennings > * He Jia > * Muhammad Firmansyah Kasim + > * Andrew Knyazev +

[Numpy-discussion] NumPy Development Meeting - Triage Focus

2019-12-17 Thread Warren Weckesser
Hi all, Our bi-weekly triage-focused NumPy development meeting is tomorrow (Wednesday, December 18) at 11 am Pacific Time. Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg Best regards, Warren

Re: [Numpy-discussion] [SciPy-Dev] ANN: SciPy 1.4.1

2019-12-19 Thread Warren Weckesser
On 12/19/19, Tyler Reddy wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Hi all, > > On behalf of the SciPy development team I'm pleased to announce > the release of SciPy 1.4.1, which is a bug fix release. Thanks for the quick fix, Tyler! Warren > > Sources and binary wheels c

Re: [Numpy-discussion] [SciPy-Dev] NumPy 1.16.6 release.

2019-12-30 Thread Warren Weckesser
eWithSteak >- Charles Harris >- Chris Burr >- Eric Wieser >- Fernando Saravia >- Lars Grueter >- Matti Picus >- Maxwell Aladago >- Qiming Sun >- Warren Weckesser > > > *Pull requests merged* > > A total of 14 pull requests were

[Numpy-discussion] Deprecate numpy.dual?

2020-01-03 Thread Warren Weckesser
In response to some work on improving the documentation of `numpy.linalg` and how it compares to `scipy.linalg`, Kevin Sheppard suggested that the documentation of the module `numpy.dual` should also be improved. When I mentioned this suggestion in the community meeting on December 11, it was sugg

Re: [Numpy-discussion] Deprecate numpy.dual?

2020-01-03 Thread Warren Weckesser
On 1/3/20, Sebastian Berg wrote: > On Fri, 2020-01-03 at 07:11 -0500, Warren Weckesser wrote: >> In response to some work on improving the documentation of >> `numpy.linalg` and how it compares to `scipy.linalg`, Kevin Sheppard >> suggested that the documentation of the modul

[Numpy-discussion] Is the build-system section of pyproject.toml a maintained list of the build dependencies?

2020-01-08 Thread Warren Weckesser
I'm doing some work on the travis-ci scripts, and I'd like to remove some redundant calls of 'pip install'. The scripts should get the build dependencies from a configuration file instead of having hard-coded pip commands. Is pyproject.toml the appropriate file to use for this? (Note: we also ha

Re: [Numpy-discussion] Is the build-system section of pyproject.toml a maintained list of the build dependencies?

2020-01-08 Thread Warren Weckesser
On 1/8/20, Warren Weckesser wrote: > I'm doing some work on the travis-ci scripts, and I'd like to remove > some redundant calls of 'pip install'. The scripts should get the > build dependencies from a configuration file instead of having > hard-coded pip

Re: [Numpy-discussion] Is the build-system section of pyproject.toml a maintained list of the build dependencies?

2020-01-08 Thread Warren Weckesser
se pyproject.toml? Warren > > On Wed, Jan 8, 2020 at 4:38 PM Warren Weckesser > > wrote: > >> On 1/8/20, Warren Weckesser wrote: >> > I'm doing some work on the travis-ci scripts, and I'd like to remove >> > some redundant calls of 'pip in

Re: [Numpy-discussion] Error in Covariance and Variance calculation

2020-03-20 Thread Warren Weckesser
On 3/20/20, Gunter Meissner wrote: > Dear Programmers, > > > > This is Gunter Meissner. I am currently writing a book on Forecasting and > derived the regression coefficient with Numpy: > > > > import numpy as np > X=[1,2,3,4] > Y=[1,8000,5000,1000] > print(np.cov(X,Y)) > print(np.var(X)) > Be

[Numpy-discussion] Is `numpy.lib.shape_base.normalize_axis_index` considered part of the public API?

2020-04-04 Thread Warren Weckesser
It would be handy if in scipy we can use the function `numpy.lib.shape_base.normalize_axis_index` as a consistent method for validating an `axis` argument. Is this function considered part of the public API? There are modules in numpy that do not have leading underscores but are still usually con

Re: [Numpy-discussion] Is `numpy.lib.shape_base.normalize_axis_index` considered part of the public API?

2020-04-04 Thread Warren Weckesser
On 4/4/20, Warren Weckesser wrote: > It would be handy if in scipy we can use the function > `numpy.lib.shape_base.normalize_axis_index` as a consistent method for > validating an `axis` argument. Is this function considered part of > the public API? > > There are modules in

Re: [Numpy-discussion] Is `numpy.lib.shape_base.normalize_axis_index` considered part of the public API?

2020-04-06 Thread Warren Weckesser
On 4/5/20, Sebastian Berg wrote: > On Sun, 2020-04-05 at 00:43 -0400, Warren Weckesser wrote: >> On 4/4/20, Warren Weckesser wrote: >> > It would be handy if in scipy we can use the function >> > `numpy.lib.shape_base.normalize_axis_index` as a consistent method >&g

Re: [Numpy-discussion] Is `numpy.lib.shape_base.normalize_axis_index` considered part of the public API?

2020-04-06 Thread Warren Weckesser
of how many >> downstream projects are already using it. >> >> Eric >> >> On Sun, 5 Apr 2020 at 15:06, Sebastian Berg >> wrote: >> >>> On Sun, 2020-04-05 at 00:43 -0400, Warren Weckesser wrote: >>> > On 4/4/20, Warren Weckesser wrote:

Re: [Numpy-discussion] [SciPy-Dev] NumPy 1.18.3 released.

2020-04-19 Thread Warren Weckesser
On 4/19/20, Charles R Harris wrote: > Hi All, > > On behalf of the NumPy team I am pleased to announce that NumPy 1.18.3 has > been released. This release contains various bug/regression fixes for the > 1.18 series Thanks Chuck! Warren > > The Python versions supported in this release are 3.5-

Re: [Numpy-discussion] Update the Code of Conduct Committee Membership (new members wanted)

2020-05-02 Thread Warren Weckesser
On 5/2/20, Ralf Gommers wrote: > On Thu, Apr 23, 2020 at 11:38 PM Sebastian Berg > > wrote: > >> Hi all, >> >> it has come up in the last community call that many of our committee >> membership lists have not been updated in a while. >> This is not a big issue as such. But, while these committee

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] [SciPy-Dev] ANN: SciPy 1.5.0

2020-06-22 Thread Warren Weckesser
son > * Charles Jekel + > * Julien Jerphanion + > * Jiacheng-Liu + > * Christoph Kecht + > * Paul Kienzle + > * Reidar Kind + > * Dmitry E. Kislov + > * Konrad + > * Konrad0 > * Takuya KOUMURA + > * Krzysztof Pióro > * Peter Mahler Larsen > * Eric Larson > * Anton

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

2020-07-29 Thread Warren Weckesser
Hi all, Sorry for the short notice--Sebastian is off this week, and the rest of us forgot to send the email reminder. Our bi-weekly triage-focused NumPy development meeting is in 10 minutes (today, Wednesday, July 29th, at 11 am Pacific Time (18:00 UTC)). Everyone is invited to join in and edit

[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 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

Re: [Numpy-discussion] [SciPy-Dev] ANN: SciPy 1.5.3

2020-10-19 Thread Warren Weckesser
sue with XCode 12 has > been fixed. > > Authors > == > > * Peter Bell > * CJ Carey > * Thomas Duvernay + > * Gregory Lee > * Eric Moore > * odidev > * Dima Pasechnik > * Tyler Reddy > * Simon Segerblom Rex + > * Daniel B. Smith > * Will Tirone + &g

Re: [Numpy-discussion] [SciPy-Dev] NumPy 1.19.3 release

2020-10-28 Thread Warren Weckesser
On 10/28/20, Charles R Harris wrote: > Hi All, > > On behalf of the NumPy team I am pleased to announce that NumPy 1.19.3 has > been released. NumPy 1.19.3 is a small maintenance release with two major > improvements: > >- Python 3.9 binary wheels on all supported platforms, >- OpenBLAS fi

Re: [Numpy-discussion] Using logfactorial instead of loggamma in random_poisson sampler

2021-03-06 Thread Warren Weckesser
On 3/6/21, zoj613 wrote: > Hi All, > > I noticed that the transformed rejection method for generating Poisson > random variables used in numpy makes use of the `random_loggam` function > which directly calculates the log-gamma function. It appears that a > log-factorial lookup table was added a fe

[Numpy-discussion] Ask GitHub to provide an option to not render .rst files

2021-11-22 Thread Warren Weckesser
Hey all, If you've ever tried to inspect a file on github with the `.rst` extension, there's a good chance that you were frustrated by GitHub providing a rendered view *only* of the file, with no option to view the source code like any other text file. It is certainly nice to have a rendered vie

[Numpy-discussion] Re: An article on numpy data types

2021-12-28 Thread Warren Weckesser
On 12/28/21, Lev Maximov wrote: > On Tue, Dec 28, 2021 at 3:43 PM Evgeni Burovski > > wrote: > >> Very nice overview! >> >> One question and one suggestion: >> >> 1. Is integer wraparound guaranteed for signed ints, or is it an >> implementation detail? For unsigned ints, sure, it's straight from

[Numpy-discussion] Performance mystery

2022-01-18 Thread Warren Weckesser
In the script below, the evaluation of the expression `z.real**2 + z.imag**2` is timed using the `timeit` module. `z` is a 1D array of random samples with dtype `np.complex128` and with length 25. The mystery is the change in performance of the calculation from the first array to which it is a

[Numpy-discussion] Re: Performance mystery

2022-01-23 Thread Warren Weckesser
approach probably uses > more memory, specially when large arrays need to be handled. > > All in all, this is testimonial of how much memory handling can affect > performance in modern computers. Perhaps it is time for testing different > memory allocation strategies in N

[Numpy-discussion] Re: Feature request: function to get minimum and maximum values simultaneously (as a tuple)

2022-06-30 Thread Warren Weckesser
On 6/30/22, Ewout ter Hoeven wrote: > A function to get the minimum and maximum values of an array simultaneously > could be very useful, from both a convenience and performance point of view. > Especially when arrays get larger the performance benefit could be > significant, and even more if the

[Numpy-discussion] Re: Representation of NumPy scalars

2022-09-08 Thread Warren Weckesser
On 9/8/22, Andrew Nelson wrote: > On Thu, 8 Sept 2022, 19:42 Sebastian Berg, > wrote: > >> >> TL;DR: NumPy scalars representation is e.g. `34.3` instead of >> `float32(34.3)`. So the representation is missing the type >> information. What are your thoughts on changing that? I like the idea,

[Numpy-discussion] Re: Addition of useful new functions from the array API specification

2022-12-12 Thread Warren Weckesser
On 12/12/22, Aaron Meurer wrote: > On Mon, Dec 12, 2022 at 8:46 AM Sebastian Berg > wrote: >> >> On Wed, 2022-12-07 at 14:21 -0700, Aaron Meurer wrote: >> > Hi all. >> > >> > As discussed in today's community meeting, I plan to start working on >> > adding some useful functions to NumPy which are

[Numpy-discussion] Re: Giving deprecation of e.g. `float(np.array([1]))` a shot (not 0-d)

2023-04-20 Thread Warren Weckesser
On 4/20/23, Sebastian Berg wrote: > Hi all, > > Unlike conversions of 0-d arrays via: > > float(np.array([1])) > > conversions of 1-D or higher dimensional arrays with a single element > are a bit strange: > > float(np.array([1])) > > And deprecating it has come up often enough with many i

[Numpy-discussion] Re: Giving deprecation of e.g. `float(np.array([1]))` a shot (not 0-d)

2023-05-16 Thread Warren Weckesser
On 4/21/23, Sebastian Berg wrote: > On Thu, 2023-04-20 at 20:17 +0200, Sebastian Berg wrote: >> On Thu, 2023-04-20 at 13:59 -0400, Warren Weckesser wrote: >> > On 4/20/23, Sebastian Berg wrote: >> > > Hi all, >> > > >> > > >> &

[Numpy-discussion] Re: Add to NumPy a function to compute cumulative sums from 0.

2023-08-18 Thread Warren Weckesser
On Fri, Aug 18, 2023 at 4:59 AM Ronald van Elburg < r.a.j.van.elb...@hetnet.nl> wrote: > I was trying to get a feel for how often the work around occurs. I found > three clear examples in Scipy and one unclear case. One case in holoviews. > Two in numpy. One from soundappraisal's code base. > See

[Numpy-discussion] Re: Generalized UFunc without output dimension specified as argument

2023-08-20 Thread Warren Weckesser
On Sun, Aug 20, 2023 at 7:33 AM Doug Turnbull wrote: > First of all, I really love the docs of the C API :) It's way above what I > would expect! > > I was reviewing the signature possibilities for generalized UFuncs, and > had a question > > https://numpy.org/doc/stable/reference/c-api/generaliz

[Numpy-discussion] Re: welcome Andrew Nelson to the NumPy maintainers team

2023-08-22 Thread Warren Weckesser
On Mon, Aug 21, 2023 at 4:37 AM Ralf Gommers wrote: > Hi all, > > On behalf of the steering council, I am very happy to announce that Andrew > is joining the Maintainers team. Andrew has been contributing to our CI > setup in particular for the past year, and has contributed for example the > Cir

[Numpy-discussion] Re: NEP 55 - Add a UTF-8 Variable-Width String DType to NumPy

2023-09-03 Thread Warren Weckesser
On Tue, Aug 29, 2023 at 10:09 AM Nathan wrote: > > The NEP was merged in draft form, see below. > > https://numpy.org/neps/nep-0055-string_dtype.html > > On Mon, Aug 21, 2023 at 2:36 PM Nathan wrote: >> >> Hello all, >> >> I just opened a pull request to add NEP 55, see https://github.com/numpy/n

[Numpy-discussion] Re: NEP 55 - Add a UTF-8 Variable-Width String DType to NumPy

2023-09-15 Thread Warren Weckesser
On Mon, Sep 11, 2023 at 12:25 PM Nathan wrote: > > > On Sun, Sep 3, 2023 at 10:54 AM Warren Weckesser < > warren.weckes...@gmail.com> wrote: > >> >> >> On Tue, Aug 29, 2023 at 10:09 AM Nathan >> wrote: >> > >> > The NEP was merged

[Numpy-discussion] Re: NEP 55 - Add a UTF-8 Variable-Width String DType to NumPy

2023-09-19 Thread Warren Weckesser
On Fri, Sep 15, 2023 at 3:18 PM Warren Weckesser wrote: > > > > On Mon, Sep 11, 2023 at 12:25 PM Nathan wrote: >> >> >> >> On Sun, Sep 3, 2023 at 10:54 AM Warren Weckesser < warren.weckes...@gmail.com> wrote: >>> >>> >>> >&g

[Numpy-discussion] Re: Adding bfill() to numpy.

2024-05-20 Thread Warren Weckesser
On Mon, May 20, 2024 at 9:06 AM Raquel Braunschweig via NumPy-Discussion wrote: > > Hello everyone, > > My colleague and I will be opening a Pull Request (PR) about adding bfill() > (backward fill) function to NumPy. This function is designed to fill NaN > values in an array by propagating the n

[Numpy-discussion] Enhancement for generalized ufuncs

2024-07-11 Thread Warren Weckesser
I have implemented quite a few generalized ufuncs over in ufunclab (https://github.com/WarrenWeckesser/ufunclab), and in the process I have accumulated a gufunc "wish list". Two items on that list are: (1) the ability to impose constraints on the core dimensions that are checked when the gufunc is

[Numpy-discussion] Re: Enhancement for generalized ufuncs

2024-07-12 Thread Warren Weckesser
On Fri, Jul 12, 2024 at 7:47 AM Sebastian Berg wrote: > > (You won't be able to know these relations from reading the signature, > but I doubt it's worth worrying about that.) After creating the gufunc with `PyUFunc_FromFuncAndDataAndSignature`, the gufunc author could set the `core_signature` f

[Numpy-discussion] Re: Enhancement for generalized ufuncs

2024-07-12 Thread Warren Weckesser
On Fri, Jul 12, 2024 at 2:35 PM Sebastian Berg wrote: > > On Fri, 2024-07-12 at 09:56 -0400, Warren Weckesser wrote: > > On Fri, Jul 12, 2024 at 7:47 AM Sebastian Berg > > wrote: > > > > > > > > (You won't be able to know these relations from read

[Numpy-discussion] Re: Welcome Joren Hammudoglu to the NumPy Maintainers Team

2024-08-19 Thread Warren Weckesser
On Mon, Aug 19, 2024 at 6:45 AM Sebastian Berg wrote: > > Hi all, > > please join me in welcoming Joren (https://github.com/jorenham) to the > NumPy maintainers team. > Welcome Joren! Warren > Joren has done a lot of work recently contributing, reviewing, and > maintaining typing related improv

[Numpy-discussion] Re: ENH: Uniform interface for accessing minimum or maximum value of a dtype

2024-08-26 Thread Warren Weckesser
On Mon, Aug 26, 2024 at 5:42 PM Sebastian Berg wrote: > > On Mon, 2024-08-26 at 11:26 -0400, Marten van Kerkwijk wrote: > > I think a NEP is a good idea. It would also seem to make sense to > > consider how the dtype itself can hold/calculate this type of > > information, since that will be the o