class_docstr: Tests for AdaptiveScalarEncoder
docstr: missing values
docstr_tok: ["missing","values"]
code: def testMissingValues(self):
      """missing values"""
      # forced: it's strongly recommended to use w>=21, in the example we force
      # skip the check for readib.
      mv = AdaptiveScalarEncoder(
          name="mv",
          n=14,
          w=3,
          minval=1,
          maxval=8,
          periodic=False,
          forced=True,
      )
      empty = mv.encode(SENTINEL_VALUE_FOR_MISSING_DATA)
      self.assertEqual(empty.sum(), 0)
  
file_path: nupic-legacy/tests/unit/nupic/encoders/adaptivescalar_test.py
imports: import tempfile
  import unittest
  import numpy
  from nupic.data import SENTINEL_VALUE_FOR_MISSING_DATA
  from nupic.encoders.adaptive_scalar import AdaptiveScalarEncoder
  from nupic.encoders.base import defaultDtype
label_desc: Use image node_id 2 for calling the AdaptiveScalarTest obj's underlying member method code with example usage: obj.testMissingValues() without return types