tomosipo.links.numpy module
- class tomosipo.links.numpy.NumpyLink(shape, initial_value)[source]
Bases:
LinkLink implementation for numpy arrays
- clone()[source]
- context()[source]
Context-manager to manage ASTRA interactions
This is a no-op for numpy data.
- property data
Returns a shared numpy array with the underlying data.
Changes to the return value will be reflected in the astra data.
If you want to avoid this, consider copying the data immediately, using np.copy for instance.
NOTE: if the underlying object is an Astra projection data type, the order of the axes will be in (Y, num_angles, X) order.
- Returns:
np.array
- Return type:
np.array
- property linked_data
Returns a numpy array or GPULink object
- Returns:
- Return type:
- new_empty(shape)[source]
- new_full(shape, value)[source]
- new_zeros(shape)[source]