class_docstr: Fundamental way to create a sparse node.
  
  Parameters
  ----------
  dtype : numpy dtype string such as 'int64' or 'float64' (among others)
      Type of numbers in the matrix.
  format: str
      The sparse storage strategy.
  
  Returns
  -------
  An empty SparseVariable instance.
  
  Notes
  -----
  As far as I can tell, L{scipy.sparse} objects must be matrices, i.e.
  have dimension 2.
class_docstr_tok: ["Fundamental","way","to","create","a","sparse","node",".","Parameters","--","--","--","--","--","dtype",":","numpy","dtype","string","such","as","'int64","'","or","'float64","'","(","among","others",")","Type","of","numbers","in","the","matrix",".","format",":","str","The","sparse","storage","strategy",".","Returns","--","--","--","-","An","empty","SparseVariable","instance",".","Notes","--","--","-","As","far","as","I","can","tell",",","L","{","scipy.sparse","}","objects","must","be","matrices",",","i.e",".","have","dimension","2","."]
code: def filter(self, value, strict=False, allow_downcast=None):
      if (
          isinstance(value, self.format_cls[self.format])
          and value.dtype == self.dtype
      ):
          return value
      if strict:
          raise TypeError(
              "%s is not sparse, or not the right dtype (is %s, "
              "expected %s)" % (value, value.dtype, self.dtype)
          )
      # The input format could be converted here
      if allow_downcast:
          sp = self.format_cls[self.format](value, dtype=self.dtype)
      else:
          sp = self.format_cls[self.format](value)
          if str(sp.dtype) != self.dtype:
              raise NotImplementedError(
                  "Expected %s dtype but got %s"
                  % (self.dtype, str(sp.dtype))
              )
      if sp.format != self.format:
          raise NotImplementedError()
      return sp
  
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import theano
  from theano import gof
  from six import string_types
label_desc: Use image node_id 2 for calling the SparseType obj's underlying member method code with example usage: obj.filter(value, strict, allow_downcast) and returns: sp, value