class_docstr: Ensures common frames are only stored once to optimize memory use.
  
  To further reduce the memory use, it is optionally to turn on lz4 to compress the observations.
  
  Note:
      This object should only be converted to numpy array just before forward pass.
class_docstr_tok: ["Ensures","common","frames","are","only","stored","once","to","optimize","memory","use",".","To","further","reduce","the","memory","use",",","it","is","optionally","to","turn","on","lz4","to","compress","the","observations",".","Note",":","This","object","should","only","be","converted","to","numpy","array","just","before","forward","pass","."]
docstr: Gets a numpy array of stacked frames with specific dtype.
  
  Args:
      dtype: The dtype of the stacked frames
  
  Returns:
      The array of stacked frames with dtype
docstr_tok: ["Gets","a","numpy","array","of","stacked","frames","with","specific","dtype",".","Args",":","dtype",":","The","dtype","of","the","stacked","frames","Returns",":","The","array","of","stacked","frames","with","dtype"]
code: def __array__(self, dtype=None):
      """Gets a numpy array of stacked frames with specific dtype.
  
      Args:
          dtype: The dtype of the stacked frames
  
      Returns:
          The array of stacked frames with dtype
      """
      arr = self[:]
      if dtype is not None:
          return arr.astype(dtype)
      return arr
  
file_path: gym/gym/wrappers/frame_stack.py
imports: from collections import deque
  from typing import Union
  import numpy
  import gym
  from gym.error import DependencyNotInstalled
  from gym.spaces import Box
label_desc: Use image node_id 2 for calling the LazyFrames obj's underlying member method code with example usage: obj.__array__(dtype) and returns: arr, arr