class_docstr: Class providing an artificial backend, that reads data into memory.
class_docstr_tok: ["Class","providing","an","artificial","backend",",","that","reads","data","into","memory","."]
docstr: Loads data into self.data.
  
  Parameters
  ----------
  data_source: np.array or str
       Array or name of the file containing the data.
  dataset_type: str
       Kind of data to be loaded (`"train"` | `"test"` | `"validation"`).
docstr_tok: ["Loads","data","into","self.data",".","Parameters","--","--","--","--","--","data_source",":","np.array","or","str","Array","or","name","of","the","file","containing","the","data",".","dataset_type",":","str","Kind","of","data","to","be","loaded","(","`","``","train","''","`","|","`","``","test","''","`","|","`","``","validation","''","`",")","."]
code: def _load(self, data_source, dataset_type):
      """Loads data into self.data.
  
      Parameters
      ----------
      data_source: np.array or str
           Array or name of the file containing the data.
      dataset_type: str
           Kind of data to be loaded (`"train"` | `"test"` | `"validation"`).
      """
      logger.debug(
          "Simple in-memory data loading of {} dataset.".format(
              dataset_type
          )
      )
      self.data_source = data_source
      self.dataset_type = dataset_type
  
      if isinstance(self.data_source, pd.DataFrame):
          self.data_source = self.data_source.values
      elif isinstance(self.data_source, list):
          self.data_source = np.array(self.data_source)
  
      if isinstance(self.data_source, np.ndarray):
          if self.use_indexer is True:
              self.mapper = DataIndexer(
                  self.data_source,
                  backend="in_memory" if self.in_memory else "sqlite",
                  root_directory=self.root_directory,
              )
              self.data = self.mapper.get_indexes(self.data_source)
          elif self.remap:
              # create a special mapping for partitions, persistent mapping from main indexes
              # to partition indexes
              self.mapper = DataIndexer(
                  self.data_source,
                  backend="sqlite",
                  name=self.name,
                  root_directory=self.root_directory,
              )
              self.data = self.mapper.get_indexes(self.data_source)
          else:
              self.mapper = self.use_indexer
              self.data = self.mapper.get_indexes(self.data_source)
      else:
          loader = self.identifier.fetch_loader()
          raw_data = loader(self.data_source)
          if self.use_indexer is True:
              self.mapper = DataIndexer(
                  raw_data,
                  backend="in_memory" if self.in_memory else "sqlite",
                  root_directory=self.root_directory,
              )
              self.data = self.mapper.get_indexes(raw_data)
          elif self.use_indexer is False:
              if self.remap:
                  # create a special mapping for partitions, persistent mapping from
                  # main indexes to partition indexes
                  self.mapper = DataIndexer(
                      raw_data,
                      backend="sqlite",
                      name=self.name,
                      root_directory=self.root_directory,
                  )
                  self.data = self.mapper.get_indexes(raw_data)
              else:
                  self.data = raw_data
                  logger.debug("Data won't be indexed")
          elif isinstance(self.use_indexer, DataIndexer):
              self.mapper = self.use_indexer
              self.data = self.mapper.get_indexes(raw_data)
      self.data_shape = self.mapper.backend.data_shape
  
imports: import logging
  import tempfile
  import uuid
  from datetime import datetime
  import numpy
  import pandas
  import tensorflow
  from .data_indexer import DataIndexer
  from .source_identifier import DataSourceIdentifier
label_desc: Use image node_id 6 for calling the NoBackend obj's underlying member method code with example usage: obj._load(data_source, dataset_type) without return types