SyntaxFix
Write A Post
Hire A Developer
Questions
Previous answers assume that the array is a python standard list. As someone who uses numpy often, I'd recommend a very pythonic test of:
if hasattr(N, "__len__")