code: def _calculate_std_res(self, counts, total, colsum, rowsum):
          
          if set(self.dim_types) & DT.ARRAY_TYPES:  # ---has-mr-or-ca---
              return self._array_type_std_res(counts, total, colsum, rowsum)
          return self._scalar_type_std_res(counts, total, colsum, rowsum)
docs: Return ndarray containing standard residuals.
  
          The shape of the return value is the same as that of *counts*.