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 : catalyst.pipeline.factors.Factor
      The factor for which to compute correlations of each of its columns
      with `target`.
  target : catalyst.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 : catalyst.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:`catalyst.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",":","catalyst.pipeline.factors.Factor","The","factor","for","which","to","compute","correlations","of","each","of","its","columns","with","`","target","`",".","target",":","catalyst.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",":","catalyst.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",":","`","catalyst.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 numpy import broadcast_arrays
  from scipy.stats import linregress, pearsonr, spearmanr
  from catalyst.errors import IncompatibleTerms
  from catalyst.pipeline.factors import CustomFactor
  from catalyst.pipeline.filters import SingleAsset
  from catalyst.pipeline.mixins import SingleInputMixin
  from catalyst.pipeline.sentinels import NotSpecified
  from catalyst.pipeline.term import AssetExists
  from catalyst.utils.input_validation import expect_bounded, expect_dtypes
  from catalyst.utils.numpy_utils import float64_dtype, int64_dtype
  from .technical 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