The existence check of value immediately following the isinstance check against flattenable_types will throw a ValueError if used with a numpy ndarray.
import numpy as np
from flatten_dict import flatten
d = {'a': np.array([0, 1, 2]), 'b': 2}
dflat = flatten(d, enumerate_types=(np.ndarray,))
flatten_dict.py - Line 76
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
The existence check of value immediately following the isinstance check against flattenable_types will throw a ValueError if used with a numpy ndarray.
flatten_dict.py - Line 76
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()