[Numpy-discussion] Re: Improved 2DFFT Approach

2024-03-12 Thread Jerome Kieffer
On Tue, 12 Mar 2024 11:34:40 - via NumPy-Discussion wrote: > https://github.com/2D-FFT-Project/2d-fft/blob/main/notebooks/comparisons.ipynb Hi, Since you are using a notebook to perform the benchmark, I would advise you to use: ``` timing = %timeit -o some_function(*args) ``` Because you

[Numpy-discussion] Re: Change in numpy.percentile

2023-10-08 Thread Jerome Kieffer
On Fri, 06 Oct 2023 19:17:22 - norbertpiotraduc...@gmail.com wrote: > Hi, > I have an idea to change the numpy.percentile. Think numpy.percentile and > numpy.nanpercentyl are the same features, and the only difference is that > numpy.nanpercentyl doesn't include NaN values. Wouldn't it be e

[Numpy-discussion] Re: ANN: NumExpr 2.8.6 Released

2023-09-13 Thread Jerome Kieffer
On Tue, 12 Sep 2023 14:56:08 -0700 Robert McLeod wrote: > Hi everyone, > > NumExpr 2.8.6 is a release to deal with issues related to downstream > `pandas` > where the sanitization blacklist was hitting private variables used in their > evaluate. In addition the sanitization was hitting on scient

[Numpy-discussion] Re: mean_std function returning both mean and std

2023-06-03 Thread Jerome Kieffer
On Fri, 02 Jun 2023 21:42:51 - "Ronald van Elburg" wrote: > I had a closer look at the paper. When I have more brain and time I > may check the mathematics. The focus is however more on streaming > data, which is an application with completely different demands. I > think that here we can not

[Numpy-discussion] Re: mean_std function returning both mean and std

2023-06-02 Thread Jerome Kieffer
On Fri, 02 Jun 2023 11:47:14 - "Ronald van Elburg" wrote: > Aha, the unnecessary copy mentioned in the > https://dbs.ifi.uni-heidelberg.de/files/Team/eschubert/publications/SSDBM18-covariance-authorcopy.pdf. > paper is a copy of the input. Here it is about discarding a valuable output > (

[Numpy-discussion] Re: mean_std function returning both mean and std

2023-06-01 Thread Jerome Kieffer
On Wed, 31 May 2023 19:15:12 - "Ronald van Elburg" wrote: > I created a solution for ENH: Computing std/var and mean at the same time, > issue #23741. The solution can be found here: > https://github.com/soundappraisal/numpy/tree/stdmean-dev-001 I like the idea ... so often one calculate

[Numpy-discussion] Re: Precision changes to sin/cos in the next release?

2023-05-31 Thread Jerome Kieffer
On Wed, 31 May 2023 15:59:45 +0300 Matti Picus wrote: > There is a discussion about a runtime context variable/manager that > would extend errorstate to have a precision flag as well in > https://github.com/numpy/numpy/issues/23362. I like this idea ... -- Jérôme Kieffer tel +33 476 882 445

[Numpy-discussion] Re: Precision changes to sin/cos in the next release?

2023-05-30 Thread Jerome Kieffer
Hi Sebastian, I had a quick look at the PR and it looks like you re-implemented the sin-cos function using SIMD. I wonder how it compares with SLEEF (header only library, CPU-architecture agnostic SIMD implementation of transcendental functions with precision validation). SLEEF is close to the In

[Numpy-discussion] Re: 1D ndarray to java double[]

2023-01-01 Thread Jerome Kieffer
On Sun, 01 Jan 2023 05:31:55 -0800 Bill Ross wrote: > Thanks! > > > Java is known to be big-endian ... your CPU is probably little-endian. > > $ lscpu | grep -i endian > Byte Order: Little Endian > > > Numpy has the tools to represent an array of double BE. > > Is there a lower-level

[Numpy-discussion] Re: 1D ndarray to java double[]

2023-01-01 Thread Jerome Kieffer
On Sat, 31 Dec 2022 23:45:54 -0800 Bill Ross wrote: > How best to write a 1D ndarray as a block of doubles, for reading in > java as double[] or a stream of double? > > Maybe the performance of simple looping over doubles in python.write() > and java.read() is fine, but maybe there are represen

[Numpy-discussion] Re: Passing output array to bincount

2022-10-22 Thread Jerome Kieffer
On Thu, 20 Oct 2022 23:26:37 - ntess...@pm.me wrote: > As far as I can see, there is no equivalent numpy functionality. In fact, as > far as I'm aware, there isn't any fast alternative outside of > C/Cython/numba/.. We have cummulative histograms in silx ... and found it useful. Maybe it wo

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

2022-07-01 Thread Jerome Kieffer
Hi, There is an implementation in silx.math.combo.minmax(): https://github.com/silx-kit/silx/blob/master/src/silx/math/combo.pyx#L266 Cheers Jerome On Thu, 30 Jun 2022 22:50:12 +0200 "Andras Deak" wrote: > On Thu, Jun 30, 2022, at 22:23, Ewout ter Hoeven wrote: > > A function to get the minim

[Numpy-discussion] Re: Future of numpy.distutils

2022-06-13 Thread Jerome Kieffer
Hi Evgeni, Thanks for your input, apparently, you project uses `meson-pep517` while scipy uses `meson-python` for interfacing meson with the python side of the building. For now, I am not settled on one version or another but among the python community there should be one and only one obvious way

[Numpy-discussion] Re: Future of numpy.distutils

2022-06-10 Thread Jerome Kieffer
10, 2022 at 10:53 AM Matthew Brett > wrote: > > > Hi, > > > > On Fri, Jun 10, 2022 at 9:41 AM Jerome Kieffer > > wrote: > > > > > > Dear Numpy developpers, > > > > > > We are developing a set of scientific tools > > > (h

[Numpy-discussion] Future of numpy.distutils

2022-06-10 Thread Jerome Kieffer
Dear Numpy developpers, We are developing a set of scientific tools (https://github.com/silx-kit) and all our build infrastructure is based on `numpy.distutils` which apparently is going to disappear in the coming years. Beside us, the `scipy` project was using it ... Ralf Gommers has ported `sc

[Numpy-discussion] Re: Performance mystery

2022-01-19 Thread Jerome Kieffer
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 iteration). Hi all, Very interesting discussion ... IIRC, timeit does some c

[Numpy-discussion] Re: deprecating numpy.distutils

2022-01-17 Thread Jerome Kieffer
Hi, I should mention many of our software projects (fabio, pyFAI, ...) rely on silx for the nested setup.py part, and not all are mentionned in this list. In the absence of alternative solution, we limit the version of setup.py for now but we are willing to help in finding a solution (our complet

[Numpy-discussion] Re: Intel's Short Vector Math Library has been merged as a git submodule

2021-10-11 Thread Jerome Kieffer
On Mon, 11 Oct 2021 18:04:58 +0300 Matti Picus wrote: > As SciPy already found out, some downstream libraries may need to tweak > their tolerances for some functions as a result of this PR. We wanted to > put it in early enough in the release cycle so that we can back it out > fully or partial

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

2021-08-18 Thread Jerome Kieffer
I strongly agree with you Gregor: * Best precision should remain the default. I lost months in finding the compiler option (in ICC) which switched to LA mode and broke all my calculations. * I wonder how those SVML behaves on non-intel plateform ? Sleef provides the same approach but it works

Re: [Numpy-discussion] Numpy 1.20.1 availability

2021-03-15 Thread Jerome Kieffer
On Sun, 14 Mar 2021 10:14:13 + Peter Cock wrote: > I'm impressed to see 17 million conda-forge numpy downloads, vs > 'just' 2.5 million downloads of the default channel's package: I doubt the download figures from conda are correct ... A couple of days after my software package has entered

Re: [Numpy-discussion] Showing by examples how Python-Numpy can be efficient even for computationally intensive tasks

2020-11-26 Thread Jerome Kieffer
On Thu, 26 Nov 2020 22:14:40 +0100 (CET) PIERRE AUGIER wrote: > I changed the email subject because I'd like to focus less on CO2 (a very > interesting subject, but not my focus here) and more on computing... > Hi Pierre, We may turn the problem in another way around: one should more focus on

Re: [Numpy-discussion] Comment published in Nature Astronomy about The ecological impact of computing with Python

2020-11-24 Thread Jerome Kieffer
Hi Pierre, I agree with your point of view: the author wants to demonstrate C++ and Fortran are better than Python... and environmentally speaking he has some evidences. We develop with Python, Cython, Numpy, and OpenCL and what annoys me most is the compilation time needed for the development of

Re: [Numpy-discussion] NEP 38 - Universal SIMD intrinsics

2020-02-13 Thread Jerome Kieffer
On Wed, 12 Feb 2020 19:36:10 + "Devulapalli, Raghuveer" wrote: > j. _mm512_sqrt_ps/pd (I could be wrong on this one, but from the little > google search I did, it seems like power ISA doesn’t have a vectorized sqrt > instruction) Hi, starting at Power7 (we are at Power9), the sqrt is avai

Re: [Numpy-discussion] Adding a hex version like PY_VERSION_HEX

2018-10-05 Thread Jerome Kieffer
On Fri, 5 Oct 2018 11:31:20 +0300 Matti Picus wrote: > In PR 12074 https://github.com/numpy/numpy/pull/12074 I propose adding a > function `version.get_numpy_version_as_hex()` which returns a hex value > to represent the current NumPy version MAJOR.MINOR.MICRO where > > v = hex(MAJOR << 24 | M

Re: [Numpy-discussion] Changing the return type of np.histogramdd

2018-04-10 Thread Jerome Kieffer
> Either we should: > >1. Just change it, and hope no one is broken by it >2. Add a dtype argument: > - If dtype=None, behave like np.histogram > - If dtype is not specified, emit a future warning recommending to > use dtype=None or dtype=float > - In future, change

Re: [Numpy-discussion] Direct GPU support on NumPy

2018-01-02 Thread Jerome Kieffer
On Tue, 02 Jan 2018 15:37:16 + Yasunori Endo wrote: > If the reason is just about human resources, > I'd like to try implementing GPU support on my NumPy fork. > My goal is to create standard NumPy interface which supports > both CUDA and OpenCL, and more devices if available. I think this i

Re: [Numpy-discussion] Generalized rectangle intersection. (Was: Array blitting)

2017-07-10 Thread Jerome Kieffer
On Sun, 9 Jul 2017 23:35:58 +0200 Mikhail V wrote: > disclaimer: I am not a past contributor to numpy and I don't know > much about github, and what pull request means. So I just put the > examples here. > > So in short, the proposal idea is to add a library function which > calculates the inter