code: def _clean_nan_inf(ts):
      """
      Converts tuples & lists to Numpy arrays and replaces nan and inf values with zeros
  
      Parameters
      ----------
      ts: Time series to clean
      """
  
      # Convert time series to a Numpy array
      ts = to_np_array(ts)
  
      search = np.isinf(ts) | np.isnan(ts)
      ts[search] = 0
  
      return ts
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from .None import distanceProfile
  from .None import order
  from .utils import mass, movmeanstd
  import numpy
  import multiprocessing
  from functools import partial
  import math
  from .scrimp import scrimp_plus_plus
label_desc: Use image node_id 3 for calling a global function with example usage: _clean_nan_inf(ts) and returns: ts