code: def safe_min(X):
      """Returns the minimum value of a dense or a CSR/CSC matrix.
  
      Adapated from http://stackoverflow.com/q/13426580
  
      """
      if issparse(X):
          if len(X.data) == 0:
              return 0
          m = X.data.min()
          return m if X.getnnz() == X.size else min(m, 0)
      else:
          return X.min()
  
imports: from __future__ import division
  from functools import partial
  import warnings
  import numpy
  from scipy import linalg
  from scipy.sparse import issparse, csr_matrix
  from .None import check_random_state
  from .fixes import np_version
  from ._logistic_sigmoid import _log_logistic_sigmoid
  from ..externals.six.moves import xrange
  from .sparsefuncs_fast import csr_row_norms
  from .validation import check_array
  from ..exceptions import NonBLASDotWarning
label_desc: Use image node_id 19 for calling a global function with example usage: safe_min(X) and returns: unknown, X, int