docstr: Ratio of voxel size from pyramid level from_level to to_level.
  
  Given two scale space resolutions a = from_level, b = to_level,
  returns the ratio of voxels size at level b to voxel size at level a
  (the factor that must be used to multiply voxels at level a to
  'expand' them to level b).
  
  Parameters
  ----------
  from_level : int, 0 <= from_level < L, (L = number of resolutions)
      the resolution to expand voxels from
  to_level : int, 0 <= to_level < from_level
      the resolution to expand voxels to
  
  Returns
  -------
  factors : array, shape (k,), k = 2, 3
      the expand factors (a scalar for each voxel dimension)
docstr_tok: ["Ratio","of","voxel","size","from","pyramid","level","from_level","to","to_level",".","Given","two","scale","space","resolutions","a","=","from_level",",","b","=","to_level",",","returns","the","ratio","of","voxels","size","at","level","b","to","voxel","size","at","level","a","(","the","factor","that","must","be","used","to","multiply","voxels","at","level","a","to","'expand","'","them","to","level","b",")",".","Parameters","--","--","--","--","--","from_level",":","int",",","0","<","=","from_level","<","L",",","(","L","=","number","of","resolutions",")","the","resolution","to","expand","voxels","from","to_level",":","int",",","0","<","=","to_level","<","from_level","the","resolution","to","expand","voxels","to","Returns","--","--","--","-","factors",":","array",",","shape","(","k",",",")",",","k","=","2",",","3","the","expand","factors","(","a","scalar","for","each","voxel","dimension",")"]
code: def get_expand_factors(self, from_level, to_level):
      """Ratio of voxel size from pyramid level from_level to to_level.
  
      Given two scale space resolutions a = from_level, b = to_level,
      returns the ratio of voxels size at level b to voxel size at level a
      (the factor that must be used to multiply voxels at level a to
      'expand' them to level b).
  
      Parameters
      ----------
      from_level : int, 0 <= from_level < L, (L = number of resolutions)
          the resolution to expand voxels from
      to_level : int, 0 <= to_level < from_level
          the resolution to expand voxels to
  
      Returns
      -------
      factors : array, shape (k,), k = 2, 3
          the expand factors (a scalar for each voxel dimension)
  
      """
      factors = np.array(self.spacings[to_level]) / np.array(
          self.spacings[from_level]
      )
      return factors
  
imports: import logging
  from dipy.align import floating
  import numpy
  import numpy.linalg
  from scipy.ndimage import gaussian_filter
label_desc: Use image node_id 2 for calling the ScaleSpace obj's underlying member method code with example usage: obj.get_expand_factors(from_level, to_level) and returns: factors