def _numpy_dict_to_sparse_matrix(
    numpy_dict):
  """Convert a dictionary of numpy arrays into a scipy sparse matrix.

  Args:
    numpy_dict: A dictionary representing the data.

  Returns:
    A scipy sparse matrix representing the data.
  """
  return scipy.sparse.coo_matrix((numpy_dict['values'],
                                  (numpy_dict['rows'], numpy_dict['cols'])),
                                 shape=numpy_dict['shape'],
                                 dtype='float32').transpose()
Convert a dictionary of numpy arrays into a scipy sparse matrix.

  Args:
    numpy_dict: A dictionary representing the data.

  Returns:
    A scipy sparse matrix representing the data.
  
language/nql/nql/io.py