class_docstr: Test behaviour of the learn_dynamic_structure of `from_numpy_dynamic`
class_docstr_tok: ["Test","behaviour","of","the","learn_dynamic_structure","of","`","from_numpy_dynamic","`"]
docstr: Providing an empty data set should result in a Value Error explaining that data must not be empty.
  This error is useful to catch and handle gracefully, because otherwise the user would experience
  misleading division by zero, or unpacking errors.
docstr_tok: ["Providing","an","empty","data","set","should","result","in","a","Value","Error","explaining","that","data","must","not","be","empty",".","This","error","is","useful","to","catch","and","handle","gracefully",",","because","otherwise","the","user","would","experience","misleading","division","by","zero",",","or","unpacking","errors","."]
code: def test_empty_data_raises_error(self):
      """
      Providing an empty data set should result in a Value Error explaining that data must not be empty.
      This error is useful to catch and handle gracefully, because otherwise the user would experience
      misleading division by zero, or unpacking errors.
      """
  
      with pytest.raises(
          ValueError,
          match="Input data X is empty, cannot learn any structure",
      ):
          from_numpy_dynamic(np.empty([0, 5]), np.zeros([5, 5]))
      with pytest.raises(
          ValueError,
          match="Input data Xlags is empty, cannot learn any structure",
      ):
          from_numpy_dynamic(np.zeros([5, 5]), np.empty([0, 5]))
  
imports: import re
  import networkx
  import numpy
  import pandas
  import pytest
  from causalnex.structure.dynotears import from_numpy_dynamic, from_pandas_dynamic
label_desc: Use image node_id 1 for calling the TestFromNumpyDynotears obj's underlying member method code with example usage: obj.test_empty_data_raises_error() without return types