FAQ
On
calculate_weightsI got the following:
assert np.all([A.dtype == "int" for A in Symbol_matrices])
AssertionError
What should I do?
- Answer:
- Because of not so clear dtypes policies,
pyitlibneed all integer columnsas int type (col.dtype must return ‘str’). So to fix you can do:
Instead of:
bn.calculate_weights(discretized_data)
Convert dtypes to intc:
bn.calculate_weights(discretized_data.astype(np.intc))