tomosipo Logo
  • Tomosipo
  • Introduction and tutorials
  • Topic guides
  • Reference
    • API Summary
    • API Reference
      • tomosipo package
        • Subpackages
        • Submodules
  • HOWTOs and recipes
  • Changelog
tomosipo
  • Reference
  • API Reference
  • tomosipo package
  • tomosipo.links package
  • tomosipo.links.numpy module
  • View page source

tomosipo.links.numpy module

class tomosipo.links.numpy.NumpyLink(shape, initial_value)[source]

Bases: Link

Link 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]
Previous Next

© Copyright 2020, Allard Hendriksen.

Built with Sphinx using a theme provided by Read the Docs.