noise_element
- odl.core.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.
Notes
This method is intended for internal testing purposes. For more explicit example elements see
odl.core.phantomsandLinearSpaceElement.examples.Parameters
- space
LinearSpace Space in which to create an element. The
odl.core.set.space.LinearSpace.elementmethod of the space needs to accept input ofnumpy.ndarraytype.
Returns
noise_element :
spaceelementExamples
Create single noise element:
>>> space = odl.rn(3) >>> vector = noise_element(space)
See Also
noise_array noise_elements odl.core.set.space.LinearSpace.examples : Examples of elements typical
to the space.
- space