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

2023-05-31 Thread Robert Kern
On Wed, May 31, 2023 at 5:01 PM David Menéndez Hurtado < davidmen...@gmail.com> wrote: > On Wed, 31 May 2023, 22:41 Robert Kern, wrote: > >> Not sure anyone really uses tanh for serious work. >> > > At the risk of derailing the discussion, the case I can think of

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

2023-05-31 Thread Robert Kern
rticularly special values at places in between adjacent representable floating point numbers. > I'm ambivalent about reverting. I know I would love speed improvements > because transformation calculations in GIS is slow using numpy, but also > some coordinate transformations might break

[Numpy-discussion] Re: Create a method to index N-dim tensors using 1D index #23992

2023-06-20 Thread Robert Kern
] |21> x = np.arange(2*3).reshape((2, 3)) [~] |22> x array([[0, 1, 2], [3, 4, 5]]) [~] |23> x.flat[[0, 1, 2, 3]] array([0, 1, 2, 3]) ``` -- Robert Kern ___ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send

[Numpy-discussion] Re: mixed mode arithmetic

2023-07-10 Thread Robert Kern
otion scheme. `np.dot()` is kind of an oddball already, and "half-precision inputs -> full-precision outputs" might be a worthwhile use case given hardware accelerators. Given that this largely affects non-numpy implementations of the Array API, you probably want to raise it with that group.

[Numpy-discussion] Re: mixed mode arithmetic

2023-07-11 Thread Robert Kern
iding such an `out=`) will fall down to the `ff->f` loop and cause upcasting of the operands, which is not what they want. But notionally one could add an `ee->f` loop between those two that would catch this case when `dtype=np.float32` is requested. -- Robert Kern

[Numpy-discussion] Re: np.dot yields a different result when computed in two pieces

2023-07-25 Thread Robert Kern
g > To unsubscribe send an email to numpy-discussion-le...@python.org > https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ > Member address: robert.k...@gmail.com > -- Robert Kern ___ NumPy-Discussion mailing list -- numpy-discus

[Numpy-discussion] ANN: NumExpr 2.8.5

2023-08-06 Thread Robert McLeod
ot for RC releases): http://pypi.python.org/pypi/numexpr Documentation is hosted at: http://numexpr.readthedocs.io/en/latest/ Share your experience - Let us know of any bugs, suggestions, gripes, kudos, etc. you may have. Enjoy data!

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

2023-08-11 Thread Robert Kern
21]) > ``` > which matches your example in the cumsum0() documentation. Did something > change in a recent release? > That's not what's in his example. -- Robert Kern ___ NumPy-Discussion mailing list -- numpy-discussion@python

Re: [Numpy-discussion] Type annotations for NumPy

2017-11-28 Thread Robert T. McGibbon
them up a little bit and opensource it shortly. -Robert On Sun, Nov 26, 2017 at 1:58 PM, Stephan Hoyer wrote: > On Sat, Nov 25, 2017 at 3:34 PM Matthew Rocklin > wrote: > >> Thoughts on basing this on a more generic Array type rather than the >> np.ndarray? I can imagine o

Re: [Numpy-discussion] Type annotations for NumPy

2017-11-28 Thread Robert T. McGibbon
by no means ready for real users, but I hope this is a useful place to build from. Any feedback or contributions would be appreciated. -Robert On Tue, Nov 28, 2017 at 2:04 PM, Stephan Hoyer wrote: > On Tue, Nov 28, 2017 at 5:11 PM Robert T. McGibbon > wrote: > >> I'm strongl

[Numpy-discussion] Determining NPY_ABI_VERSION statically in compiled extensions

2018-10-08 Thread Robert T. McGibbon
of numpy, that would be fine. I'm interested in creating something similar to https://github.com/pypa/auditwheel that could statically check for compatibility between wheel files and python installations, in situations where the metadata about how they were compiled is missing. -- -R

Re: [Numpy-discussion] Determining NPY_ABI_VERSION statically in compiled extensions

2018-10-08 Thread Robert T. McGibbon
Matti, That doesn't quite cover my use case. I'm interested in querying a .whl file containing .so files that were compiled against numpy (not my currently installed version of numpy) to determine the conditions under which those `.so` files were compiled. -Robert On Mon, Oct 8, 2018

[Numpy-discussion] Re: Endorsing SPECs 1, 6, 7, and 8

2024-10-08 Thread Robert Kern via NumPy-Discussion
program code. NEP 19 doesn't need an update for us to endorse SPEC 7 (whether it needs one, separately, to clarify its intent is another question). -- Robert Kern ___ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send

[Numpy-discussion] Re: Canonical way of serialising Generators

2024-10-27 Thread Robert Kern via NumPy-Discussion
turn dict(bg_state=bg_state, seed_seq=ss_dict) def rng_fromdict(d): bg_state = d['bg_state'] ss = np.random.SeedSequence(**d['seed_seq']) bg = getattr(np.random, bg_state['bit_generator'])(ss) bg.state = bg_state rng = np.random.Generator(bg)

[Numpy-discussion] Re: Suggestion to show the shape in repr for summarized arrays

2024-10-01 Thread Robert Kern via NumPy-Discussion
se and leave the 0-length-axis case alone. 3. Fix the 0-length-axis case to use the following `# shape=...` comment too. -- Robert Kern ___ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-le...@

[Numpy-discussion] Re: [EXTERNAL] Copy on __setitem__

2024-12-26 Thread Robert Kern via NumPy-Discussion
is suggesting that behavior should change. The issue is whether or not an unnecessary, _additional_ copy gets made when converting a not-exactly-an-`ndarray` object to an `ndarray` object before doing the assignment (which always copies values over to the destination array). -- Robert

[Numpy-discussion] Re: surprising behavior from array indexing

2024-12-30 Thread Robert Kern via NumPy-Discussion
py/pull/5749/files >>> original_oindex = OrthogonalIndexer(original) >>> original_oindex[i, j, k] array([[1237, 1241, 1243], [1267, 1271, 1273], [1297, 1301, 1303], [1327, 1331, 1333], [1357, 1361, 1363]]) Note that some other array implementations li

[Numpy-discussion] Re: odd behaviour of meshgrid with 3 arrays

2024-11-21 Thread Robert Kern via NumPy-Discussion
ich is primarily for 2D arrays (and presumably following a convention from another language like MATLAB). In order to get the (2, 3, 4) arrays that you want, use `indexing='ij'` # Note the flipped order of inputs and outputs since you want the `zt` values across the fi

[Numpy-discussion] Re: Proposal to Extend NumPy Broadcasting for (D₁, D₂, ..., N, M) → (D₁, D₂, ..., K, M) When K is a Multiple of N (K % N == 0)

2025-04-05 Thread Robert Kern via NumPy-Discussion
ort into it, but I think the first step would be to walk through what the stride tricks actually would be to get this operation to work. Then we can talk about whether or not it's desirable to plug it in. -- Robert Kern ___ NumPy-Discussion mai

[Numpy-discussion] Re: Add Sampling with Dynamic weights with replacement to np.random.choice

2025-05-02 Thread Robert Kern via NumPy-Discussion
ike an ad hoc algorithm rather than a well-known, well-studied random process. I'm happy to be corrected with references to the literature, but even if there are references, I'm happy to leave this for users to implement on their own. -- Robert Kern _

[Numpy-discussion] Re: Format of arrays to facilitate analysis

2025-02-18 Thread Robert Kern via NumPy-Discussion
ing polygons onto images, I might follow scikit-image's convention instead. By and large, you can usually safely follow whatever is your personal preference without fearing that you are missing out on something vital. What makes these convention

[Numpy-discussion] Re: Format of arrays to facilitate analysis

2025-02-18 Thread Robert Kern via NumPy-Discussion
one of the arrangements than others (e.g. the ravelled will likely be the least convenient), but it has more to do with other code and file formats that you are interacting with that will be the largest factors in breaking the symmetry. -- Robert Kern __

[Numpy-discussion] Re: Functions for secant, cosecant, and cotangent

2025-02-12 Thread Robert Kern via NumPy-Discussion
g any that do implement these functions (the exception being the cotangent in degrees, which Cephes implements, and we already expose in scipy.special). -- Robert Kern ___ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscr

[Numpy-discussion] Re: Feature Request: Left (and Right) inverse of the Cross Product

2025-06-02 Thread Robert Kern via NumPy-Discussion
s(c, a) / (a**2).sum() > Out[135]: array([-0.93244529, 0.74775365, 1.09117371]) > Delightful! -- Robert Kern ___ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-le...@python.org https

[Numpy-discussion] Re: Feature Request: Left (and Right) inverse of the Cross Product

2025-06-02 Thread Robert Kern via NumPy-Discussion
print(res) ... [-2.22044605e-16 0.e+00 -1.66533454e-16] [7.56339436e-16 8.88178420e-16 2.77555756e-16] [-5.55111512e-17 -2.77555756e-16 -2.22044605e-16] [-1.66533454e-16 -5.55111512e-17 0.e+00] [0.e+00 6.66133815e-16 3.33066907e-16] [-1.11022302e-16 0.0

[Numpy-discussion] Re: Can't launch Jupyter

2025-06-28 Thread Robert Kern via NumPy-Discussion
On Sat, Jun 28, 2025 at 8:42 AM Kwaku Oppong via NumPy-Discussion < numpy-discussion@python.org> wrote: > can someone helps me. Whenever i ytried to launch Jupyter from Navigator, > this is the message I gets > Sorry, this isn't the place for Jupyter questio

<    1   2   3   4