noise_element¶
- odl.util.testutils.noise_element(space)[source]¶
Create a white noise element in
space.The element contains white noise with standard deviation 1 in the case of floating point dtypes and uniformly spaced values between -10 and 10 in the case of integer dtypes.
For product spaces the method is called recursively for all sub-spaces.
- Parameters:
- space
LinearSpace Space in which to create an element. The LinearSpace.element method of the space needs to accept input of
numpy.ndarraytype.
- space
- Returns:
- noise_element
spaceelement
- noise_element
See also
noise_arraynoise_elementsodl.set.space.LinearSpace.examplesExamples of elements typical to the space.
Notes
This method is intended for internal testing purposes. For more explicit example elements see
odl.phantomsandLinearSpaceElement.examples.Examples
Create single noise element:
>>> space = odl.rn(3) >>> vector = noise_element(space)