class_docstr: A Factor that computes spearman rank correlation coefficients between the
  columns of a given Factor and either the columns of another
  Factor/BoundColumn or a slice/single column of data.
  
  Parameters
  ----------
  base_factor : zipline.pipeline.Factor
      The factor for which to compute correlations of each of its columns
      with `target`.
  target : zipline.pipeline.Term with a numeric dtype
      The term with which to compute correlations against each column of data
      produced by `base_factor`. This term may be a Factor, a BoundColumn or
      a Slice. If `target` is two-dimensional, correlations are computed
      asset-wise.
  correlation_length : int
      Length of the lookback window over which to compute each correlation
      coefficient.
  mask : zipline.pipeline.Filter, optional
      A Filter describing which assets (columns) of `base_factor` should have
      their correlation with `target` computed each day.
  
  See Also
  --------
  :func:`scipy.stats.spearmanr`
  :meth:`Factor.spearmanr`
  :class:`zipline.pipeline.factors.RollingSpearmanOfReturns`
  
  Notes
  -----
  Most users should call Factor.spearmanr rather than directly construct an
  instance of this class.
class_docstr_tok: ["A","Factor","that","computes","spearman","rank","correlation","coefficients","between","the","columns","of","a","given","Factor","and","either","the","columns","of","another","Factor\/BoundColumn","or","a","slice\/single","column","of","data",".","Parameters","--","--","--","--","--","base_factor",":","zipline.pipeline.Factor","The","factor","for","which","to","compute","correlations","of","each","of","its","columns","with","`","target","`",".","target",":","zipline.pipeline.Term","with","a","numeric","dtype","The","term","with","which","to","compute","correlations","against","each","column","of","data","produced","by","`","base_factor","`",".","This","term","may","be","a","Factor",",","a","BoundColumn","or","a","Slice",".","If","`","target","`","is","two-dimensional",",","correlations","are","computed","asset-wise",".","correlation_length",":","int","Length","of","the","lookback","window","over","which","to","compute","each","correlation","coefficient",".","mask",":","zipline.pipeline.Filter",",","optional","A","Filter","describing","which","assets","(","columns",")","of","`","base_factor","`","should","have","their","correlation","with","`","target","`","computed","each","day",".","See","Also","--","--","--","--",":","func",":","`","scipy.stats.spearmanr","`",":","meth",":","`","Factor.spearmanr","`",":","class",":","`","zipline.pipeline.factors.RollingSpearmanOfReturns","`","Notes","--","--","-","Most","users","should","call","Factor.spearmanr","rather","than","directly","construct","an","instance","of","this","class","."]
code: def compute(self, today, assets, out, base_data, target_data):
      # If `target_data` is a Slice or single column of data, broadcast it
      # out to the same shape as `base_data`, then compute column-wise. This
      # is efficient because each column of the broadcasted array only refers
      # to a single memory location.
      target_data = broadcast_arrays(target_data, base_data)[0]
      for i in range(len(out)):
          out[i] = spearmanr(base_data[:, i], target_data[:, i])[0]
  
imports: from numexpr import evaluate
  import numpy
  from numpy import broadcast_arrays
  from scipy.stats import linregress, spearmanr
  from zipline.assets import Asset
  from zipline.errors import IncompatibleTerms
  from zipline.pipeline.factors import CustomFactor
  from zipline.pipeline.filters import SingleAsset
  from zipline.pipeline.mixins import StandardOutputs
  from zipline.pipeline.sentinels import NotSpecified
  from zipline.pipeline.term import AssetExists
  from zipline.utils.input_validation import expect_bounded, expect_dtypes, expect_types
  from zipline.utils.math_utils import nanmean
  from zipline.utils.numpy_utils import float64_dtype, int64_dtype
  from .basic import Returns
label_desc: Use image node_id 1 for calling the RollingSpearman obj's underlying member method code with example usage: obj.compute(today, assets, out, base_data, target_data) without return types