class_docstr: Test bind and value initialization for a ``DatasetSparseArray``, with all
  possible sparse types.
class_docstr_tok: ["Test","bind","and","value","initialization","for","a","``","DatasetSparseArray","``",",","with","all","possible","sparse","types","."]
docstr: Test that a ``DatasetSparseArray`` can be value-initialized from
  any Scipy sparse array or matrix.
docstr_tok: ["Test","that","a","``","DatasetSparseArray","``","can","be","value-initialized","from","any","Scipy","sparse","array","or","matrix","."]
code: def test_value_init(self, sp_in):
      """Test that a ``DatasetSparseArray`` can be value-initialized from
      any Scipy sparse array or matrix."""
  
      dset_sp = DatasetSparseArray(sp_in)
  
      assert dset_sp.info["type_id"] == "sparse_array"
      assert (
          dset_sp.info["py_type"]
          == f"scipy.sparse.{type(sp_in).__qualname__}"
      )
      assert dset_sp.sparse_array_class is type(sp_in)
  
      sp_out = dset_sp.get_value()
      assert isinstance(sp_out, type(sp_in))
  
      assert (sp_in.todense() == sp_out.todense()).all()
  
imports: import pytest
  import scipy.sparse
  from pennylane.data.attributes.sparse_array import DatasetSparseArray
label_desc: Use image node_id 1 for calling the TestDatasetsSparseArray obj's underlying member method code with example usage: obj.test_value_init(sp_in) without return types