[Numpy-discussion] np 1.7b2 PyArray_BYTES(obj)=ptr fail

Frédéric Bastien nouiz@nouiz....
Tue Oct 2 10:45:50 CDT 2012


We implement our own subtensor(x[...], where ... can be index or
slice) c code due to the way Theano work.

I can probably change the logic, but if you plan to revert this
interface changes, I prefer to wait for this change we someone else is
doing other changes that would conflict. Also, I did a Theano release
candidate and I really would like the final version to work with the
next release of NumPy.

thanks.

Fred

On Tue, Oct 2, 2012 at 11:33 AM, Charles R Harris
<charlesr.harris@gmail.com> wrote:
>
>
> On Tue, Oct 2, 2012 at 8:34 AM, Frédéric Bastien <nouiz@nouiz.org> wrote:
>>
>> Hi,
>>
>> I don't know if that was raised or not, but in np1.7b2 doing this fail
>> with this error message:
>>
>> PyArray_BYTES(obj)=ptr
>>
>> file:lne_number:offset: error: lvalue required as left operatnd of
>> assignment.
>>
>> I tried with PyArray_DATA(obj)=ptr and this also fail.
>>
>> Do you want to remove this feature now? I would think this change will
>> be done at the same time as the one related to the macro
>> NPY_NO_DEPRECATED_API.
>>
>> If I missed the discussion about this, tell me.
>>
>
> f2py wants to do the same thing, i.e., change the data pointer of an
> existing array, which is why NPY_NO_DEPRECATED_API is not defined in that
> module. I had some discussion off list with Pearu about that but it petered
> out. I think for this sort of thing is a new function needs to be
> implemented. What precisely is your application? IIRC, Pearu was using it to
> exchange pointers between two arrays to avoid a copy.
>
> Chuck
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>


More information about the NumPy-Discussion mailing list