class_docstr: Common set of functionality for performing tests on the real to
  real transforms. This is not implemented as a distinct test class
  (inheriting from unittest.TestCase) because its `__init__` method
  takes multiple arguments as input which set up the size and
  directions of the transform.
class_docstr_tok: ["Common","set","of","functionality","for","performing","tests","on","the","real","to","real","transforms",".","This","is","not","implemented","as","a","distinct","test","class","(","inheriting","from","unittest.TestCase",")","because","its","`","__init__","`","method","takes","multiple","arguments","as","input","which","set","up","the","size","and","directions","of","the","transform","."]
docstr: Arguments:
  
  - `directions`: List of abbreviated directions, like 'O11' or 'E01'.
  
  - `dims`: Shape of the data.
  
  - `axes`: Axes on which to take the transformation. Defaults to the
            number of directions.
docstr_tok: ["Arguments",":","-","`","directions","`",":","List","of","abbreviated","directions",",","like","'O11","'","or","'E01","'",".","-","`","dims","`",":","Shape","of","the","data",".","-","`","axes","`",":","Axes","on","which","to","take","the","transformation",".","Defaults","to","the","number","of","directions","."]
code: def __init__(
      self,
      directions=["FFTW_REDFT00"],
      dims=(16,),
      axes=None,
      noncontiguous=True,
      dtype=None,
  ):
      """
      Arguments:
  
      - `directions`: List of abbreviated directions, like 'O11' or 'E01'.
  
      - `dims`: Shape of the data.
  
      - `axes`: Axes on which to take the transformation. Defaults to the
                number of directions.
      """
      if axes is None:
          self.axes = tuple(range(len(directions)))
      else:
          self.axes = axes
      for dim in dims:
          if dim < 3:
              raise NotImplementedError(
                  "Due to complications with the DCT1, "
                  "arrays must be of length at least "
                  "three."
              )
  
      if len(self.axes) != len(directions):
          raise ValueError(
              "There must be exactly one axis per direction."
          )
  
      self.directions = directions
      self.inverse_directions = [
          inverse_lookup[direction] for direction in directions
      ]
      self.dims = dims
      self._normalisation_factor = 1.0
      for index, axis in enumerate(self.axes):
          dim = self.dims[axis]
          direction = self.directions[index]
          self._normalisation_factor *= normalisation_lookup[direction](
              dim
          )
  
      if noncontiguous:
          self._input_array = empty_noncontiguous(dims)
          self._output_array = empty_noncontiguous(dims)
      else:
          self._input_array = numpy.zeros(dims)
          self._output_array = numpy.zeros(dims)
      self.plan = pyfftw.FFTW(
          self._input_array,
          self._output_array,
          axes=self.axes,
          direction=self.directions,
      )
      self.inverse_plan = pyfftw.FFTW(
          self._input_array,
          self._output_array,
          axes=self.axes,
          direction=self.inverse_directions,
      )
  
      self.tol = 1e-10
      if dtype is None:
          if "64" in _supported_types:
              dtype = numpy.float64
          elif "32" in _supported_types:
              dtype = numpy.float32
              self.tol = 1e-5
          elif "ld" in _supported_types:
              dtype = numpy.longdouble
              self.tol = 1e-14
      self.dtype = dtype
  
imports: from __future__ import division
  import itertools
  import random
  import unittest
  import numpy
  import pyfftw
  from pyfftw import _supported_types
  from .test_pyfftw_base import run_test_suites
label_desc: Use image node_id 1 to create a new TestRealTransform object from inherited base classes: object with example: obj = TestRealTransform(directions, dims, axes, noncontiguous, dtype)