Click here to Skip to main content
15,919,434 members

Comments by Elizabeth farriell (Top 1 by date)

Elizabeth farriell 18-Apr-24 10:31am View    
When I replace & with and I get the error:

/usr/local/lib/python3.10/site-packages/numpy/core/numeric.py:486: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecat
ed. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
return multiarray.count_nonzero(a)
Traceback (most recent call last):
File "/home/ElizabethFarriell/truckit.py", line 106, in <module>
Northeast_Analysis()
File "/home/ElizabethFarriell/truckit.py", line 27, in Northeast_Analysis
light_count = np.count_nonzero((5, northeast_packages) and (northeast_packages, 50))
File "<__array_function__ internals>", line 5, in count_nonzero
File "/usr/local/lib/python3.10/site-packages/numpy/core/numeric.py", line 486, in count_nonzero
return multiarray.count_nonzero(a)
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
>>>