I used FeatureClassToNumPyArray like this:
arcpy.MakeFeatureLayer_management(datapath, "lyr_fixpoints", "area_in_m2 > 8000")
arr = arcpy.da.FeatureClassToNumPyArray("lyr_fixpoints", ('land_type', 'asset_cat', 'name', 'maintenance'), null_value=-999)
print arr
and get the following 1d array:
[(5, 0, 380, 3) (1, 4, 369, 3) (5, 0, 421, 2) (0, 7, 425, 1)]
Now I want to convert this array into a 2d array of this form, because the 2d array is very suitable for my further operations.
[[5 0 380 3]
[1 4 369 3]
[5 0 421 2]
[0 7 425 1]]
Can someone help me?
Best Answer
I can't specifically comment on ArcPy, as I have never used it. However it seems that you already have a 2-D numpy array with a shape of 4x4 (4 rows and 4 columns):
The 2D array: Array shape = (4, 4); Dimensions = 2.
The 1D array: Array shape = (16, ); Dimensions = 1.