code: def csv_to_array(csv_path, delimiters=" \t,;", **kwargs):
      """Read a CSV file by trying to guess its delimiter.
  
      Parameters
      ----------
      csv_path: string or pathlib.Path
          Path of the CSV file to load.
  
      delimiters: string
          Each character of the delimiters string is a potential delimiters for
          the CSV file.
  
      kwargs: keyword arguments
          The additional keyword arguments are passed to numpy.genfromtxt when
          loading the CSV.
  
      Returns
      -------
      array: numpy.ndarray
          An array containing the data loaded from the CSV file.
      """
      csv_path = stringify_path(csv_path)
      if not isinstance(csv_path, str):
          raise TypeError(
              f"CSV must be a file path. Got a CSV of type: {type(csv_path)}"
          )
  
      try:
          # First, we try genfromtxt which works in most cases.
          array = np.genfromtxt(
              csv_path, loose=False, encoding=None, **kwargs
          )
      except ValueError:
          # There was an error during the conversion to numpy array, probably
          # because the delimiter is wrong.
          # In that case, we try to guess the delimiter.
          try:
              with open(csv_path) as csv_file:
                  dialect = csv.Sniffer().sniff(
                      csv_file.readline(), delimiters
                  )
          except csv.Error as e:
              raise TypeError(
                  f"Could not read CSV file [{csv_path}]: {e.args[0]}"
              )
  
          array = np.genfromtxt(
              csv_path,
              delimiter=dialect.delimiter,
              encoding=None,
              **kwargs,
          )
  
      return array
  
imports: import csv
  import numpy
  from .helpers import stringify_path
label_desc: Use image node_id 3 for calling a global function with example usage: csv_to_array(csv_path, delimiters) and returns: array