On Thu, Jul 10, 2008 at 9:33 AM, Anne Archibald <[EMAIL PROTECTED]>
wrote:

> 2008/7/9 Robert Kern <[EMAIL PROTECTED]>:
>
> > Because that's just what a buffer= argument *is*. It is not a place
> > for presenting the starting pointer to exotically-strided memory. Use
> > __array_interface__s to describe the full range of representable
> > memory. See below.
>
> Aha! Is this stuff documented somewhere?
>
> > I was about a week ahead of you. See numpy/lib/stride_tricks.py in the
> trunk.
>
> Nice! Unfortunately it can't quite do what I want... for the linear
> algebra I need something that can broadcast all but certain axes. For
> example, take an array of matrices and an array of vectors. The
> "array" axes need broadcasting, but you can't broadcast on all axes
> without (incorrectly) turning the vector into a matrix. I've written a
> (messy) implementation, but the corner cases are giving me headaches.
> I'll let you know when I have something that works.
>

I think something like a matrix/vector dtype would be another way to go for
stacks of matrices and vectors. It would have to be a user defined type to
fit into the current type hierarchy for ufuncs, but I think the base
machinery is there with the generic inner loops.

Chuck
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to