Could someone give a full/working example of a function in pyO3 that takes a single input, and returns true/false
depending on whether the input has type scipy.sparse.csr_matrix
?
I'm aware that pyO3 has is_instance
, but that seems to require having an object that represents a type. I know about get_type
, but that assumes you already have an object of the right type, which gets me confused.