class_docstr: Test behaviour of the from_pandas method
docstr: Providing a data set including nan or inf should result in a Value Error explaining that data contains nan.
  This error is useful to catch and handle gracefully, because otherwise the user would have empty structures.
docstr_tok: ["Providing","a","data","set","including","nan","or","inf","should","result","in","a","Value","Error","explaining","that","data","contains","nan",".","This","error","is","useful","to","catch","and","handle","gracefully",",","because","otherwise","the","user","would","have","empty","structures","."]
code: def test_check_array(self, data):
      """
      Providing a data set including nan or inf should result in a Value Error explaining that data contains nan.
      This error is useful to catch and handle gracefully, because otherwise the user would have empty structures.
      """
      with pytest.raises(
          ValueError,
          match=r"Input contains .*(NaN|infinity|too large).*",
      ):
          from_pandas(pd.DataFrame(data=data, columns=["a"]))
  
imports: import logging
  import networkx
  import numpy
  import pandas
  import pytest
  import scipy.optimize
  from mock import patch
  from causalnex.structure import StructureModel
  from causalnex.structure.data_generators import generate_binary_data, generate_binary_dataframe, generate_continuous_dataframe, generate_count_dataframe, generate_structure
  from causalnex.structure.pytorch.notears import from_numpy, from_pandas
label_desc: Use image node_id 18 for calling the TestFromPandas obj's underlying member method code with example usage: obj.test_check_array(data) without return types