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.ndarray
type.
- space
- Returns
- noise_element
space
element
- noise_element
See also
noise_array
noise_elements
odl.set.space.LinearSpace.examples
Examples of elements typical to the space.
Notes
This method is intended for internal testing purposes. For more explicit example elements see
odl.phantoms
andLinearSpaceElement.examples
.Examples
Create single noise element:
>>> space = odl.rn(3) >>> vector = noise_element(space)