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: Overwrite this method as we are subclassing numpy array.
  
  Args:
      ufunc: The ufunc object that was called.
      method: A string indicating which Ufunc method was called
              (one of "__call__", "reduce", "reduceat", "accumulate", "outer",
              "inner").
      *inputs: A tuple of the input arguments to the ufunc.
      **kwargs: Any additional arguments
  
  Returns:
      The result of the operation.
docstr_tok: ["Overwrite","this","method","as","we","are","subclassing","numpy","array",".","Args",":","ufunc",":","The","ufunc","object","that","was","called",".","method",":","A","string","indicating","which","Ufunc","method","was","called","(","one","of","``","__call__","''",",","``","reduce","''",",","``","reduceat","''",",","``","accumulate","''",",","``","outer","''",",","``","inner","''",")",".","*","inputs",":","A","tuple","of","the","input","arguments","to","the","ufunc",".","*","*","kwargs",":","Any","additional","arguments","Returns",":","The","result","of","the","operation","."]
code: def __array_ufunc__(
      self, ufunc: Any, method: Text, *inputs: Any, **kwargs: Any
  ) -> Any:
      """Overwrite this method as we are subclassing numpy array.
  
      Args:
          ufunc: The ufunc object that was called.
          method: A string indicating which Ufunc method was called
                  (one of "__call__", "reduce", "reduceat", "accumulate", "outer",
                  "inner").
          *inputs: A tuple of the input arguments to the ufunc.
          **kwargs: Any additional arguments
  
      Returns:
          The result of the operation.
      """
      f = {
          "reduce": ufunc.reduce,
          "accumulate": ufunc.accumulate,
          "reduceat": ufunc.reduceat,
          "outer": ufunc.outer,
          "at": ufunc.at,
          "__call__": ufunc,
      }
      # convert the inputs to np.ndarray to prevent recursion, call the function,
      # then cast it back as FeatureArray
      output = FeatureArray(
          f[method](*(i.view(np.ndarray) for i in inputs), **kwargs),
          number_of_dimensions=kwargs["number_of_dimensions"],
      )
      output.__dict__ = self.__dict__  # carry forward attributes
      return output
  
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 4 for calling the FeatureArray obj's underlying member method code with example usage: obj.__array_ufunc__(ufunc, method) and returns: output