[Numpy-discussion] Re: New matvec and vecmat functions

2024-01-24 Thread Alan
Why do these belong in NumPy? What is the broad field of application of these functions? And, does a more general concept underpin them? Thanks, Alan Isaac On Tue, Jan 23, 2024 at 5:17 PM Marten van Kerkwijk wrote: > Hi All, > > I have a PR [1] that adds `np.matvec` and `np.vecmat` gu

[Numpy-discussion] Re: New matvec and vecmat functions

2024-01-24 Thread Alan
only one column, so a "stack" of them is actually 3d. Perhaps the needless dimension is then the real problem and can either not be produced or can be squeezed away.. Thanks, Alan Isaac ___ NumPy-Discussion mailing list -- numpy-disc

[Numpy-discussion] Re: New matvec and vecmat functions

2024-01-25 Thread Alan
, but I'm still confused about the need. Perhaps the following illustrates why. With respect to the example you offered, what am I missing? Alan Isaac import numpy as np rng = np.random.default_rng() rot = np.array([[0,-1],[1,0]])#a rotation matrix print("first type of stack of vect

Re: [Numpy-discussion] : Boolean binary '-' operator

2017-06-27 Thread Alan Isaac
(e.g., the derived graphs that allow an intuitive representation of transitive closure). fwiw, Alan ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Adding a return value to np.random.shuffle

2018-04-12 Thread Alan Isaac
Some people consider that not to be Pythonic: https://mail.python.org/pipermail/python-dev/2003-October/038855.html Alan Isaac On 4/12/2018 1:36 PM, Joseph Fox-Rabinovitz wrote: Would it break backwards compatibility to add the input as a return value to np.random.shuffle? I doubt anyone out

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

2018-12-09 Thread Alan Isaac
eparate functions in apparently similar cases. (I am not at all trying to claim that the argument against flag parameters is definitive; I'm just mentioning that this viewpoint has already been promulgated on this list.) Cheers, Alan Isaac ___ NumP

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

2018-12-10 Thread Alan Isaac
cular case? Alan Isaac ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] adding Quansight Labs as institutional partner

2019-04-09 Thread Alan Isaac
leads to a flipcause site that fails to clarify. I suspect many academic institutions would be interested in making occasional, modest contributions toward NumPy development, if the recipient and intended uses were entirely transparent. Cheers, Alan Isaac On 4/9/2019 3:10 AM, Ralf Gommers wrote

[Numpy-discussion] folds and scans

2019-05-12 Thread Alan Isaac
hon's `reduce` is certainly conceivable for the fold.) Thank you, Alan Isaac ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-24 Thread Alan Isaac
Points of reference: Mathematica: https://reference.wolfram.com/language/ref/Transpose.html Matlab: https://www.mathworks.com/help/matlab/ref/permute.html Personally I would find any divergence between a.T and a.transpose() to be rather surprising. Cheers, Alan Isaac

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-24 Thread Alan Isaac
Iirc, that works only on (2-d) matrices. Cheers, Alan Isaac On 6/24/2019 10:45 AM, Todd wrote: I think the corresponding MATLAB function/operation is this: https://www.mathworks.com/help/matlab/ref/transpose.html ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Alan Isaac
iest and least buggy transition away from np.matrix. But since `a.H` would not be a view of `a`, most probably any `a.H` proposal should be discarded as misleading and not materially better than the existing syntax (a.conj().T). I trust nobody is proposing to change `transpose`.

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Alan Isaac
gns are usually carefully considered. Cheers, Alan Isaac ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] error during pip install

2019-09-27 Thread Alan Isaac
Upgrading numpy with pip on Python 3.8b4 on Win 10 produced: ERROR: Could not install packages due to an EnvironmentError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: '"C:' However, the install appears to have been successful. f

Re: [Numpy-discussion] error during pip install

2019-09-28 Thread Alan Isaac
On Fri, Sep 27, 2019 at 10:12 AM Alan Isaac wrote: Upgrading numpy with pip on Python 3.8b4 on Win 10 produced: ERROR: Could not install packages due to an EnvironmentError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: &#x

Re: [Numpy-discussion] error during pip install

2019-09-28 Thread Alan Isaac
3.8 pip or numpy. Possibly relevant: https://github.com/numpy/numpy/issues/11451 Alan ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion

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

2023-08-22 Thread Alan G. Isaac
`cumsum` provides a sequence of partial sums, exactly as expected. https://reference.wolfram.com/language/ref/Accumulate.html https://www.mathworks.com/help/matlab/ref/cumsum.html https://docs.julialang.org/en/v1/base/arrays/#Base.cumsum https://hackage.haskell.org/package/base-4.12.0.0/docs/Data-

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

2020-11-24 Thread Alan G. Isaac
per watt, and avoids the worst waste disposal issues. fwiw, Alan Isaac ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] problem with numpy 1.19.4 install via pip on Win 10

2020-12-02 Thread Alan G. Isaac
numpy 1.19.3 installs fine. numpy 1.19.4 appears to install but does not work. (Details below. The supplied tinyurl appears relevant.) Alan Isaac PS test> python38 -m pip install -U numpy Collecting numpy Using cached numpy-1.19.4-cp38-cp38-win_amd64.whl (13.0 MB) Installing collected packa

Re: [Numpy-discussion] problem with numpy 1.19.4 install via pip on Win 10

2020-12-03 Thread Alan G. Isaac
"current expectation is that this [fix] will be able to be released near the end of January 2021" ! On 12/2/2020 7:13 PM, Ilhan Polat wrote: Yes this is known and we are waiting MS to roll out a solution for this. Here are more details https://developercommunity2.visualstudio.com/t/fmod-after-

Re: [Numpy-discussion] NEP 48: Spending NumPy Project funds

2021-02-22 Thread Alan G. Isaac
Yes. On 2/22/2021 7:08 AM, Pearu Peterson wrote: it is nobody's business, IMHO, and is likely very hard if not impossible to verify ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussio

[Numpy-discussion] two questions about `choose`

2021-04-17 Thread Alan G. Isaac
generic], Sequence[Union[int, float, complex, str, bytes, generic]], Sequence[Sequence[Any]],_SupportsArray]" However, `choose` is happy to have e.g. `choices=(0,seq)` (and I hope it will remain so!). E.g., a = a = (0,1,1,0,0,0,1,1) #binary array np.choose((0,range(8)) #array([0, 1, 2,

Re: [Numpy-discussion] two questions about `choose`

2021-04-18 Thread Alan G. Isaac
sequences are converted to arrays and in this case the conversion is not returning a 2 element object array but expanding and then concatenation. On Sat, Apr 17, 2021, 18:56 Alan G. Isaac mailto:alan.is...@gmail.com>> wrote: 2. Separately, mypy is unhappy with my 2nd argument to `

Re: [Numpy-discussion] EHN: Discusions about 'add numpy.topk'

2021-05-30 Thread Alan G. Isaac
Is there any thought of allowing for other comparisons? In which case `last_k` might be preferable. Alan Isaac On 5/30/2021 2:38 AM, Ilhan Polat wrote: I think "max_k" is a good generalization of the regular "max". ___ NumPy-Dis

Re: [Numpy-discussion] EHN: Discusions about 'add numpy.topk'

2021-05-30 Thread Alan G. Isaac
/sort/#Base.Sort.partialsortperm Alan Isaac On 5/30/2021 4:40 AM, kang...@mail.ustc.edu.cn wrote: Hi, Thanks for reply, I present some details below: ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] Re: How do I use the numpy on spyder?

2024-10-31 Thread Alan via NumPy-Discussion
Nowadays, free AIs are good for such questions: https://www.youtube.com/watch?v=bA-tbHwvA6A hth On Thu, Oct 31, 2024 at 9:31 AM Joao Pereira via NumPy-Discussion < numpy-discussion@python.org> wrote: > I don´t know how to use the numpy on spyder. I have tried to use this > line: "import numpy as