class_docstr: Default decoder for :class:`~ffcv.fields.NDArrayField`.
class_docstr_tok: ["Default","decoder","for",":","class",":","`","~ffcv.fields.NDArrayField","`","."]
code: def declare_state_and_memory(
      self, previous_state: State
  ) -> Tuple[State, AllocationQuery]:
      return (
          replace(
              previous_state,
              jit_mode=True,
              shape=self.field.shape,
              dtype=self.field.dtype,
          ),
          AllocationQuery(self.field.shape, self.field.dtype),
      )
  
imports: from typing import Callable, TYPE_CHECKING, Tuple, Type
  import warnings
  import json
  from dataclasses import replace
  import numpy
  import torch
  from .base import Field, ARG_TYPE
  from ..pipeline.operation import Operation
  from ..pipeline.state import State
  from ..pipeline.compiler import Compiler
  from ..pipeline.allocation_query import AllocationQuery
  from ..libffcv import memcpy
label_desc: Use image node_id 1 for calling the NDArrayDecoder obj's underlying member method code with example usage: obj.declare_state_and_memory(previous_state) and returns: replace,  AllocationQuery