class_docstr: Custom Environment that raised NaNs and Infs
class_docstr_tok: ["Custom","Environment","that","raised","NaNs","and","Infs"]
code: def step(action):
      if np.all(np.array(action) > 0):
          obs = float("NaN")
      elif np.all(np.array(action) < 0):
          obs = float("inf")
      else:
          obs = 0
      return [obs], 0.0, False, {}
  
file_path: stable-baselines/tests/test_vec_check_nan.py
imports: import gym
  from gym import spaces
  import numpy
  from stable_baselines.common.vec_env import DummyVecEnv, VecCheckNan
label_desc: Use image node_id 2 for calling the NanAndInfEnv obj's underlying member method code with example usage: obj.step(action) and returns: list,  int,  False,  dict