Hi all,
I am trying to sample k N-dimensional vectors from a uniform distribution
without replacement.
It seems like this should be straightforward, but I can't seem to pin it down.
Specifically, I am trying to get random indices in an d0 x d1 x d2.. x dN-1
array.
I thought about sneaking in a
On Fri, Nov 17, 2023, at 11:07, Robert Kern wrote:
> If the arrays you are drawing indices for are real in-memory arrays for
> present-day 64-bit computers, this should be adequate. If it's a notional
> array that is larger, then you'll need actual arbitrary-sized integer
> sampling. The builtin
On Fri, Nov 17, 2023, at 14:28, Stefan van der Walt wrote:
> Attached is a script that implements this solution.
And the version with set duplicates checking.
Stéfan
import random
import functools
import itertools
import operator
import numpy as np
def cumulative_prod(arr):
return list(ite
On Fri, Nov 17, 2023, at 16:52, Robert Kern wrote:
> That optimistic optimization makes this the fastest solution.
That'd work great, thanks Robert, Aaron, and everyone who shared input.
Stéfan___
NumPy-Discussion mailing list -- numpy-discussion@pytho
Hi Doug,
On Sat, Nov 25, 2023, at 07:14, Doug Turnbull wrote:
> Unfortunately the following command fails:
>
> incdir_numpy = run_command(py,
> ['-c', 'import numpy; print(numpy.get_include())'],
> capture: true,
> check: false,
> ).stdout().strip()
In your repo it says stderr, but the ver
Hi Doug,
On Sun, Nov 26, 2023, at 06:29, Doug Turnbull wrote:
> To debug, I ran `pip install . --no-build-isolation` it worked (using venv's
> numpy)
When developing NumPy, we typically build in the existing environment. This is
done either via `pip install -e .` (which installs hooks to trigge
On Sun, Nov 26, 2023, at 12:03, Nathan wrote:
> For my work I tend to use a persistent build directory with build isolation
> disabled as discussed in the meson-python docs.
Out of curiosity, how is this different from, e.g., `spin build` which builds
into `./build-install`?
Stéfan
Hi Nathan,
On Tue, Nov 28, 2023, at 08:42, Nathan wrote:
> It looks like `spin build` does `meson build` and `meson install` and doesn't
> do `pip install`. I'd like numpy to be importable in a python environment of
> my choosing, so I tend to instead manually install numpy into that
> environm
On Fri, Jan 26, 2024, at 12:04, Ralf Gommers wrote:
> We've got four new NumPy maintainers! Welcome to the team, and
> congratulations to:
>
> - Raghuveer Devulapalli (https://github.com/r-devulap)
> - Chris Sidebottom (https://github.com/mousius)
> - Mateusz Sokół (https://github.com/mtsokol/)
>
On Wed, Feb 14, 2024, at 14:34, Nathan wrote:
> The DType API publicly exposes the PyArray_DTypeMeta C struct, which
> represents DType metaclasses. It also exposes a function for registering
> user-defined DTypes and a set of slot IDs and function typedefs that users
> can implement in C to wri
Hi Alexander,
On 2024-03-14 22:43:38, Alexander Levin via NumPy-Discussion
wrote:
Memory Usage -
https://github.com/2D-FFT-Project/2d-fft/blob/testnotebook/notebooks/memory_usage.ipynb
Timing comparisons(updated) -
https://github.com/2D-FFT-Project/2d-fft/blob/testnotebook/notebooks/comparis
On Thu, Jul 4, 2024, at 08:18, Daniele Nicolodi wrote:
> I wish it for be common sense for contributors to an open source
> codebase that they need to own the copyright on their contributions, but
> I don't think it can be assumed. Adding something to these lines to the
> project policy has also
Hi Nathan,
On Tue, Jul 16, 2024, at 12:24, Nathan wrote:
> I just pushed some commits to the numpy-user-dtypes repo
> (https://github.com/numpy/numpy-user-dtypes) that fixes compatibility with
> the public version of the DType API that shipped in NumPy 2.0. If you’ve been
> waiting for some run
On Mon, Aug 19, 2024, at 03:00, Sebastian Berg wrote:
> please join me in welcoming Joren (https://github.com/jorenham) to the
> NumPy maintainers team.
Thanks for your contributions, Joren, great to have you on board!
Stéfan
___
NumPy-Discussion mailin
Hi Chuck,
On Tue, Sep 3, 2024, at 08:18, Charles R Harris wrote:
> I just got through deleting a bunch of pre-releases on PyPi and it occurred
> to me that we should have a policy as to what releases should be kept. I
> think that reproducibility requires that we keep all the major and micro
>
On Mon, Oct 7, 2024, at 06:04, Rohit Goswami wrote:
> I second Matti's comments about the validity of endorsing things we don't
> implement.
I don't think it is possible to make ecosystem-wide recommendation that will
fit each project like a glove. At best, we can try to come together as a
com
Hi Carlos,
On Thu, Mar 6, 2025, at 10:08, Carlos Martin wrote:
> Feature request: Add a `bit_width` function to NumPy's [bit-wise
> operations](https://numpy.org/doc/stable/reference/routines.bitwise.html)
> that computes the [bit-width](https://en.wikipedia.org/wiki/Bit-width)
> (also called b
17 matches
Mail list logo