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: If a == b always, ther should be an edge a->b or b->a with coefficient close to one
docstr_tok: ["If","a","==","b","always",",","ther","should","be","an","edge","a-",">","b","or","b-",">","a","with","coefficient","close","to","one"]
code: def test_certain_relationships_get_near_certain_weight(self):
      """If a == b always, ther should be an edge a->b or b->a with coefficient close to one"""
  
      np.random.seed(17)
      data = pd.DataFrame(
          [
              [np.sqrt(el), np.sqrt(el)]
              for el in np.random.choice(100, size=500)
          ],
          columns=["a", "b"],
      )
      sm = from_numpy_dynamic(
          data.values[1:], data.values[:-1], w_threshold=0.1
      )
      edge = (
          sm.get_edge_data("1_lag0", "0_lag0")
          or sm.get_edge_data("0_lag0", "1_lag0")
      )["weight"]
  
      assert 0.99 < edge <= 1.01
  
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 16 for calling the TestFromNumpyDynotears obj's underlying member method code with example usage: obj.test_certain_relationships_get_near_certain_weight() without return types