A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-December/084164.html below:

[Python-Dev] Allocation of shape and strides fields in Py_buffer

[Python-Dev] Allocation of shape and strides fields in Py_buffer [Python-Dev] Allocation of shape and strides fields in Py_bufferAntoine Pitrou solipsis at pitrou.net
Tue Dec 9 12:21:43 CET 2008
Alexander Belopolsky <alexander.belopolsky <at> gmail.com> writes:
> 
> I did not follow numpy development for the last year or more, so I
> won't qualify as "the numpy folks," but my understanding is that numpy
> does exactly what Nick recommended: the viewed object owns shape and
> strides just as it owns the data.  The viewing object increases the
> reference count of the viewed object and thus assures that data, shape
> and strides don't go away prematurely.

That doesn't work if e.g. you take a slice of a memoryview object, since the
shape changes in the process.
See http://bugs.python.org/issue4580



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4