16,022,536 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
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()
>>>