class_docstr: WARNING: for officially supported FFTs, use theano.tensor.fft, which
  provides real-input FFTs. Gradients are supported, as well as optimization
  transfers to GPU ops.
  
  An instance of this class returns a finite fourier transform calcutated
  along one dimension of an input array.
  
  inputs:
  
  a : Array of at least one dimension.  Can be complex.
  n : Integer, optional. Length of the transformed axis of the output. If n
  is smaller than the length of the input, the input is cropped. If it is
  larger, the input is padded with zeros. If n is not given, the length of
  the input (along the axis specified by axis) is used.
  axis : Integer, optional. Axis over which to compute the FFT. If not
  supplied, the last axis is used.
  
  output:
  
  Complex array.  The input array, transformed along the axis
  indicated by 'axis' or along the last axis if 'axis' is not specified. It
  is truncated or zero-padded as required if 'n' is specified.
  (From numpy.fft.fft's documentation:)
  The values in the output follow so-called standard order. If A = fft(a, n),
  then A[0] contains the zero-frequency term (the mean of the signal), which
  is always purely real for real inputs. Then A[1:n/2] contains the
  positive-frequency terms, and A[n/2+1:] contains the negative-frequency
  terms, in order of decreasingly negative frequency. For an even number of
  input points, A[n/2] represents both positive and negative Nyquist
  frequency, and is also purely real for real input. For an odd number of
  input points, A[(n-1)/2] contains the largest positive frequency, while
  A[(n+1)/2] contains the largest negative frequency.
code: def infer_shape(self, node, in_shapes):
      shape_a = in_shapes[0]
      n = node.inputs[1]
      axis = node.inputs[2]
      if len(shape_a) == 1:
          return [(n,)]
      elif isinstance(axis, tensor.TensorConstant):
          out_shape = (
              list(shape_a[0 : axis.data.item()])
              + [n]
              + list(shape_a[axis.data + 1 :])
          )
      else:
          l = len(shape_a)
          shape_a = tensor.stack(shape_a)
          out_shape = tensor.concatenate(
              (shape_a[0:axis], [n], shape_a[axis + 1 :])
          )
          n_splits = [1] * l
          out_shape = tensor.split(out_shape, n_splits, l)
          out_shape = [a[0] for a in out_shape]
      return [out_shape]
  
file_path: Theano/theano/tensor/fourier.py
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import math
  from theano import gof, tensor
label_desc: Use image node_id 2 for calling the Fourier obj's underlying member method code with example usage: obj.infer_shape(node, in_shapes) and returns: list, list