Message77606
> Antoine, regarding the shapes and strides info for subviews: don't think
> of it as reallocating or altering the shape of the underlying buffer.
> Think of it as having separate shape and stride information for the
> contents of the underlying buffer
I'm trying to be practical. If the additional shape/strides storage is
in Py_buffer, it can benefit anyone wanting to create a subview or doint
to do something else with shape and strides. If the storage is in
memoryview, it only benefits memoryview.
> I also think it is worth considering changing the memoryview to also
> take start/stop/step arguments in addition to the object to be viewed
> (initially only supporting step=1, just like slicing, but we should be
> able to lift that limitation as the implementation matures). The
> FromBuffer C-level constructor could probably go away at that point.
Could you open a separate bug for this? I agree simplifications are
welcome. As for the additional arguments, if we have proper slicing
support I'm not sure they are really useful (at the Python level at least). |
|
Date |
User |
Action |
Args |
2008-12-11 12:43:05 | pitrou | set | recipients:
+ pitrou, teoliphant, amaury.forgeotdarc, ncoghlan, belopolsky |
2008-12-11 12:43:05 | pitrou | set | messageid: <1228999385.71.0.684707722552.issue4580@psf.upfronthosting.co.za> |
2008-12-11 12:43:04 | pitrou | link | issue4580 messages |
2008-12-11 12:43:03 | pitrou | create | |
|