[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 scientific notation.

I believe this sanitization is a bit too strong since the Avogadro
number is no more compatible with numexpr:
numexpr.evaluate("6.02e23")
nor is the charge of the electron:
numexpr.evaluate("1.6e-19")
...

I would call this a bug !

> For those who do not wish to have sanitization on by default, it can
> be changed
> by setting an environment variable, `NUMEXPR_SANITIZE=0`.

Noted ...

-- 
Jérôme Kieffer
___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com


[Numpy-discussion] Skew symmetric/matrix cross product function proposal

2023-09-13 Thread Mark Stephenson
As proposed in https://github.com/numpy/numpy/issues/24687

Dynamicists frequently use the matrix representation of the cross product 
(https://en.m.wikipedia.org/wiki/Cross_product#Conversion_to_matrix_multiplication),
 and the lack of a skew symmetric operator in NumPy is a frequent source of 
annoyance.

I propose either adding a skew function to linalg that returns the skew 
symmetric matrix of a vector `np.cross(a, np.identity(a.shape[0]) * -1)` (from 
https://stackoverflow.com/questions/66707295/numpy-cross-product-matrix-function),
 or more radically, making the second argument `b` of np.cross optional and 
have `np.cross(a)` return the matrix representation of [a x]. For the latter, 
would need to consider the interaction with other kwargs and different input 
shapes.
___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com