On Thu, Jul 10, 2008 at 10:33, 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
On Thu, Jul 10, 2008 at 2:25 PM, Anne Archibald <[EMAIL PROTECTED]>
wrote:
> 2008/7/10 Charles R Harris <[EMAIL PROTECTED]>:
>
> > 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 w
2008/7/10 Charles R Harris <[EMAIL PROTECTED]>:
> 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 exo
2008/7/10 Robert Kern <[EMAIL PROTECTED]>:
> I was about a week ahead of you. See numpy/lib/stride_tricks.py in the trunk.
Robert, this is fantastic! I think people are going to enjoy your
talk at SciPy'08. If you want, we could also tutor this in the
advanced NumPy session.
Cheers
Stéfan
_
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 des
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 docume
On Wed, Jul 9, 2008 at 21:29, Anne Archibald <[EMAIL PROTECTED]> wrote:
> 2008/7/9 Robert Kern <[EMAIL PROTECTED]>:
>
>> Yes, the buffer interface, at least the subset that ndarray()
>> consumes, requires that all of the data be contiguous in memory.
>> array_as_buffer() checks for that using PyArr
2008/7/9 Robert Kern <[EMAIL PROTECTED]>:
> Yes, the buffer interface, at least the subset that ndarray()
> consumes, requires that all of the data be contiguous in memory.
> array_as_buffer() checks for that using PyArray_ISONE_SEGMENT(), which
> looks like this:
>
> #define PyArray_ISONESEGMENT(
On Wed, Jul 9, 2008 at 18:55, Anne Archibald <[EMAIL PROTECTED]> wrote:
> Hi,
>
> When trying to construct an ndarray, I sometimes run into the
> more-or-less mystifying error "expected a single-segment buffer
> object":
>
> Out[54]: (0, 16, 8)
> In [55]: A=np.zeros(2); A=A[np.newaxis,...];
> np.nd
Hi,
When trying to construct an ndarray, I sometimes run into the
more-or-less mystifying error "expected a single-segment buffer
object":
Out[54]: (0, 16, 8)
In [55]: A=np.zeros(2); A=A[np.newaxis,...];
np.ndarray(strides=A.strides,shape=A.shape,buffer=A,dtype=A.dtype)
--
10 matches
Mail list logo