title: Mean center of polygon feature class using numpy, arcpy
body: <p>I'm tasked with finding the mean center of a feature class using a numpy array. I have created a numpy array from the feature class using</p>
  
  <pre><code>import arcpy
  import numpy
  fc = "polygons.shp"
  a = arcpy.da.FeatureClassToNumPyArray(fc, ["SHAPE@X", "SHAPE@Y"])
  </code></pre>
  
  <p>the array, a, is then:</p>
  
  <pre><code>array([( 3107178.29076947,  10151024.31186805),
         ( 3107961.30479125,  10139810.52458512),
         ( 3109603.8882401 ,  10119654.26424824),
         ( 2992362.40598316,  10049723.50515586),
         ....
         ( 3114517.82381449,  10071634.68261757)],
         dtype=[('SHAPE@X', '&lt;f8'), ('SHAPE@Y', '&lt;f8')])
  </code></pre>
  
  <p>which is the centroid (X,Y) of each record in fc. How do I get the meanX and meanY of these so the output would be ([(mean.X, mean.Y)])? I've tried using the following, as described <a href="https://stackoverflow.com/questions/15819980/calculate-mean-across-dimension-in-a-2d-array">here</a>:</p>
  
  <pre><code>numpy.mean(a, axis=0)
  </code></pre>
  
  <p>but I get the mean of just the X values. Is there some additional step with changing dtype after the arcpy.da function to successfully get both the mean.X, mean.Y values? I have to do this using the numpy mean function. Thanks!</p>