コード例 #1
0
def test_node_axis_names_setter_throws_value_error():
  n1 = Node(np.eye(2), axis_names=['a', 'b'])
  with pytest.raises(TypeError):
    n1.axis_names = [0, 1]
コード例 #2
0
def test_node_axis_names_setter_throws_shape_small_mismatch_error():
  n1 = Node(np.eye(2), axis_names=['a', 'b'])
  with pytest.raises(ValueError):
    n1.axis_names = ['a']