On Tue, Jul 11, 2023 at 10:11 AM Matti Picus wrote:
>
> On 10/7/23 16:13, Jens Glaser via NumPy-Discussion wrote:
> > Hi Matti,
> >
> > The documentation for numpy.dot currently states
> >
> > """
> > out
> > ndarray, optional
> > Output argument. This must have the exact kind that would be retur
On 10/7/23 16:13, Jens Glaser via NumPy-Discussion wrote:
Hi Matti,
The documentation for numpy.dot currently states
"""
out
ndarray, optional
Output argument. This must have the exact kind that would be returned if it was
not used. In particular, it must have the right type, must be C-conti
Hi Matti,
The documentation for numpy.dot currently states
"""
out
ndarray, optional
Output argument. This must have the exact kind that would be returned if it was
not used. In particular, it must have the right type, must be C-contiguous, and
its dtype must be the dtype that would be returned
On Mon, Jul 10, 2023 at 1:49 AM Matti Picus wrote:
> On 9/7/23 23:34, glaserj--- via NumPy-Discussion wrote:
>
> > Reviving this old thread - I note that numpy.dot supports in-place
> > computation for performance reasons like this
> > c = np.empty_like(a, order='C')
> > np.dot(a, b, out=c)
> >
>
On 9/7/23 23:34, glaserj--- via NumPy-Discussion wrote:
Reviving this old thread - I note that numpy.dot supports in-place
computation for performance reasons like this
c = np.empty_like(a, order='C')
np.dot(a, b, out=c)
However, the data type of the pre-allocated c array must match the result
Neal Becker wrote:
> I've been browsing the numpy source. I'm wondering about mixed-mode
> arithmetic on arrays. I believe the way numpy handles this is that it
> never does mixed arithmetic, but instead converts arrays to a common type.
> Arguably, that might be efficient for a mix of say, doub