Nov-21-2021, 10:58 PM
If you do this:
import numpy array = numpy.array ([one, two, three])It will throw this error:
Error:Traceback (most recent call last):
File "tester.py", line 15, in <module>
array = numpy.array ([one, two, three])
NameError: name 'one' is not defined
That last line and in particularError:NameError
is the information you need to use the try/except
block. Try this:import numpy try : array = numpy.array ([one, two, three]) except NameError as e : print('*** ERROR ***', str(e))