class_docstr: Stores any kind of features ready to be used by a RasaModel.
  
  Next to the input numpy array of features, it also received the number of
  dimensions of the features.
  As our features can have 1 to 4 dimensions we might have different number of numpy
  arrays stacked. The number of dimensions helps us to figure out how to handle this
  particular feature array. Also, it is automatically determined whether the feature
  array is sparse or not and the number of units is determined as well.
  
  Subclassing np.array: https://numpy.org/doc/stable/user/basics.subclassing.html
class_docstr_tok: ["Stores","any","kind","of","features","ready","to","be","used","by","a","RasaModel",".","Next","to","the","input","numpy","array","of","features",",","it","also","received","the","number","of","dimensions","of","the","features",".","As","our","features","can","have","1","to","4","dimensions","we","might","have","different","number","of","numpy","arrays","stacked",".","The","number","of","dimensions","helps","us","to","figure","out","how","to","handle","this","particular","feature","array",".","Also",",","it","is","automatically","determined","whether","the","feature","array","is","sparse","or","not","and","the","number","of","units","is","determined","as","well",".","Subclassing","np.array",":","https",":","\/\/numpy.org\/doc\/stable\/user\/basics.subclassing.html"]
docstr: Create and return a new object.  See help(type) for accurate signature.
docstr_tok: ["Create","and","return","a","new","object",".","See","help","(","type",")","for","accurate","signature","."]
code: def __new__(
      cls, input_array: np.ndarray, number_of_dimensions: int
  ) -> "FeatureArray":
      """Create and return a new object.  See help(type) for accurate signature."""
      FeatureArray._validate_number_of_dimensions(
          number_of_dimensions, input_array
      )
  
      feature_array = np.asarray(input_array).view(cls)
  
      if number_of_dimensions <= 2:
          feature_array.units = input_array.shape[-1]
          feature_array.is_sparse = isinstance(
              input_array[0], scipy.sparse.spmatrix
          )
      elif number_of_dimensions == 3:
          feature_array.units = input_array[0].shape[-1]
          feature_array.is_sparse = isinstance(
              input_array[0], scipy.sparse.spmatrix
          )
      elif number_of_dimensions == 4:
          feature_array.units = input_array[0][0].shape[-1]
          feature_array.is_sparse = isinstance(
              input_array[0][0], scipy.sparse.spmatrix
          )
      else:
          raise ValueError(
              f"Number of dimensions '{number_of_dimensions}' currently not "
              f"supported."
          )
  
      feature_array.number_of_dimensions = number_of_dimensions
  
      return feature_array
  
imports: import logging
  from typing import Optional, DefaultDict, Dict, Iterable, Text, List, Tuple, Any, Union, NamedTuple, ItemsView, overload, cast
  from collections import defaultdict, OrderedDict
  import numpy
  import scipy.sparse
  from sklearn.model_selection import train_test_split
label_desc: Use image node_id 1 for calling the FeatureArray obj's underlying member method code with example usage: obj.__new__(cls, input_array, number_of_dimensions) and returns: feature_array