memoryview Questions

1

I have a cython module that uses memoryview arrays, that is... double[:,:] foo I want to run this module in parallel using multiprocessing. However I get the error: PicklingError: Can't pickle ...
Buehrer asked 18/12, 2013 at 1:38

1

Consider this dummy Cython code: #!python #cython: boundscheck=False #cython: wraparound=False #cython: initializedcheck=False #cython: cdivision=True #cython: nonecheck=False import numpy as np ...
Frantz asked 7/1, 2014 at 14:20

1

Solved

Concerning memoryviews in cython, is there any advantage of typing a view with NumPy types such as np.float_t instead of simply do double if I'm working with numpy float arrays? And should I type ...
Local asked 7/1, 2014 at 18:20

1

Solved

How to convert a typed memoryview to an NumPy array in cython? The docs have cimport numpy as np import numpy as np numpy_array = np.asarray(<np.int32_t[:10, :10]> my_pointer) I took this...
Canthus asked 7/1, 2014 at 17:47

1

Solved

I have a fragmented structure in memory and I'd like to access it as a contiguous-looking memoryview. Is there an easy way to do this or should I implement my own solution? For example, consider a...
Unders asked 13/12, 2013 at 11:23

1

Solved

Is it possible to get the size of a MemoryView in cython? Ideally, I'm looking for something like arr.shape in numpy.
Stefanistefania asked 5/12, 2013 at 14:37

2

Solved

Python 2.7 has introduced a new API for buffers and memoryview objects. I read the documentation on them and I think I got the basic concept (accessing the internal data of an object in a raw form...
Hintze asked 18/7, 2011 at 17:25

2

Solved

The full description of memoryview can be found here: Create a memoryview that references obj. obj must support the buffer protocol. Built-in objects that support the buffer protocol include...
Nowell asked 30/1, 2011 at 20:44

© 2022 - 2024 — McMap. All rights reserved.