docstr: This object ensures that common frames between the observations are only stored once.
  It exists purely to optimize memory usage which can be huge for DQN's 1M frames replay
  buffers.
  
  This object should only be converted to numpy array before being passed to the model.
  
  You'd not believe how complex the previous solution was.
docstr_tok: ["This","object","ensures","that","common","frames","between","the","observations","are","only","stored","once",".","It","exists","purely","to","optimize","memory","usage","which","can","be","huge","for","DQN","'s","1M","frames","replay","buffers",".","This","object","should","only","be","converted","to","numpy","array","before","being","passed","to","the","model",".","You","'d","not","believe","how","complex","the","previous","solution","was","."]
code: def __init__(self, frames):
      """This object ensures that common frames between the observations are only stored once.
      It exists purely to optimize memory usage which can be huge for DQN's 1M frames replay
      buffers.
  
      This object should only be converted to numpy array before being passed to the model.
  
      You'd not believe how complex the previous solution was."""
      self._frames = frames
      self._out = None
  
imports: import numpy
  import os
  from collections import deque
  import gym
  from gym import spaces
  import cv2
  from .wrappers import TimeLimit
label_desc: Use image node_id 1 to create a new LazyFrames object from inherited base classes: object with example: obj = LazyFrames(frames)