docstr: Convert all numpy arrays in model-parameters to lists.
  Used for json support
docstr_tok: ["Convert","all","numpy","arrays","in","model-parameters","to","lists",".","Used","for","json","support"]
code: def _listify(model_params):
      """
      Convert all numpy arrays in model-parameters to lists.
      Used for json support
      """
      for k in model_params.keys():
          param = model_params[k]
  
          if isinstance(param, np.ndarray):
              model_params[k] = param.tolist()  # for json support
          elif isinstance(param, list) and isinstance(
              param[0], np.ndarray
          ):
              model_params[k] = [
                  p.tolist() for p in param
              ]  # json support
          else:
              model_params[k] = param
      return model_params
  
imports: from abc import ABCMeta, abstractmethod
  from sklearn.exceptions import NotFittedError
  from sklearn.base import BaseEstimator
  import json
  import pickle
  import numpy
  from warnings import warn
label_desc: Use image node_id 5 for calling the BaseModelPackage obj's underlying member method code with example usage: obj._listify(model_params) and returns: model_params