class_docstr: Fits a normalizer for array data.
  
  To encode, `ArrayEncoder` returns a normalized window of previous data.
  It can be used for generic arrays, as well as for handling historical target values in time series tasks.
  
  Currently supported normalizing strategies are minmax for numerical arrays, and a simple one-hot for categorical arrays. See `lightwood.encoder.helpers` for more details on each approach.
docstr: Prepare the array encoder for sequence data.
  :param train_priming_data: Training data of sequences
  :param dev_priming_data: Dev data of sequences
docstr_tok: ["Prepare","the","array","encoder","for","sequence","data",".",":","param","train_priming_data",":","Training","data","of","sequences",":","param","dev_priming_data",":","Dev","data","of","sequences"]
code: def prepare(
      self,
      train_priming_data: Iterable[Iterable],
      dev_priming_data: Iterable[Iterable],
  ):
      """
      Prepare the array encoder for sequence data.
      :param train_priming_data: Training data of sequences
      :param dev_priming_data: Dev data of sequences
      """
      if self.is_prepared:
          raise Exception(
              'You can only call "prepare" once for a given encoder.'
          )
  
      priming_data = pd.concat([train_priming_data, dev_priming_data])
      priming_data = priming_data.values
  
      if self.output_size is None:
          self.output_size = np.max(
              [len(x) for x in priming_data if x is not None]
          )
      for i in range(len(priming_data)):
          if is_none(priming_data[i]):
              priming_data[i] = [0] * self.output_size
  
      if self.original_type in (
          dtype.categorical,
          dtype.binary,
          dtype.cat_array,
          dtype.cat_tsarray,
      ):
          self._normalizer = CatNormalizer(
              encoder_class="ordinal"
          )  # maybe turn into OHE encoder?
      else:
          self._normalizer = (
              MinMaxNormalizer()
          )  # maybe turn into numerical encoder?
  
      if isinstance(priming_data, pd.Series):
          priming_data = priming_data.values
  
      priming_data = [
          self._pad_and_strip(list(x)) for x in priming_data
      ]
  
      self._normalizer.prepare(priming_data)
      self.output_size *= self._normalizer.output_size
      self.is_prepared = True
  
imports: import torch
  import pandas
  import numpy
  from lightwood.encoder.base import BaseEncoder
  from type_infer.dtype import dtype
  from lightwood.encoder.helpers import MinMaxNormalizer, CatNormalizer
  from lightwood.helpers.general import is_none
  from typing import List, Iterable
label_desc: Use image node_id 3 for calling the ArrayEncoder obj's underlying member method code with example usage: obj.prepare(train_priming_data, dev_priming_data) without return types