I'm new at Python but I want to either assign or reference specific values from a feature class of earthquake data in a Python script to be used in a custom function. I've tried using Feature Class To NumPy Array as the following:
eq = arcpy.da.FeatureClassToNumPyArray('wells_eq', fields)
When I print the result, this is what is returned:
>>> print eq
[(41.144, -114.872, 1.6, 1.6, 1.9, 10.0, 21.0, 212.0, 71.0)]
I want to assign a variable, such as strike1 and dip1. I tried
strike1 = eq[5]
but got
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
IndexError: index 5 is out of bounds for axis 0 with size 1
As a check for indexing, I tried
>>> print eq[0]
(41.144, -114.872, 1.6, 1.6, 1.9, 10.0, 21.0, 212.0, 71.0)
So my question is, how can either I make individual variables based on the values in the feature class, or reference those values to be used in a custom function? Or should I try a different approach altogether?