code: def positivedef_matrix_sqrt(array):
      """Stable method for computing matrix square roots, supports complex matrices.
  
      Args:
                array: A numpy 2d array, can be complex valued that is a positive
                       definite symmetric (or hermitian) matrix
  
      Returns:
                sqrtarray: The matrix square root of array
      """
      w, v = np.linalg.eigh(array)
      #  A - np.dot(v, np.dot(np.diag(w), v.T))
      wsqrt = np.sqrt(w)
      sqrtarray = np.dot(v, np.dot(np.diag(wsqrt), np.conj(v).T))
      return sqrtarray
  
file_path: ecco/src/ecco/svcca_lib/cca_core.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: positivedef_matrix_sqrt(array) and returns: sqrtarray