title: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences
body: <p>i am trying to clip  a dataset but i get the following error:</p>
  <p><strong>Warning (from warnings module):
  File &quot;C:\Users\Desktop\py_magn\SnippingMap.py&quot;, line 66
  res = np.array((x, y, clipMag)).T
  VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray</strong></p>
  <p>the dataset are magnetic measurements and dimensions x,y in km of the area. with this code i try to crop the area in 90x90.
  the code is:</p>
  <pre><code>root= tk.Tk()
  canvas1 = tk.Canvas(root, width = 400, height = 400, bg = 'gray1', relief = 'raised')
  canvas1.pack()
  def getCSV ():
      global df
      
      import_file_path = filedialog.askopenfilename()
      df = np.genfromtxt(import_file_path, delimiter='_', missing_values = ' ', filling_values = None)
      
      print (df)
      
  browseButton_CSV = tk.Button(text=&quot; Import CSV File to clip &quot;, command=getCSV, bg='OrangeRed4', fg='black', font=('helvetica', 12, 'bold'))
  canvas1.create_window(200, 200, window=browseButton_CSV)
  root.mainloop()
  x, y, mag = df[:,0], df[:,1], df[:,3]
  xmin, ymin = np.min(x), np.min(y)
  xc, yc = (xmin + (90/2)), (ymin + (90/2)) # 90 einai to mege8os toy para8yrou
  print(xmin,xc)
  def clipping( x, y, mag, xc, yc):
      
      xmini, ymini = xc - 45, yc - 45
      xmaxi, ymaxi = xc + 45, xc + 45
      print(xmaxi, xc)
      count=0
      for i in x:
           if i&gt;=xmini and i&lt;=xmaxi:
               count += 1
      clipMag = mag[:count]
      xn, yn = np.unique(x), np.unique(y)
      
      ind = np.where(xn == xmini)
      ind=ind[0][0]
      xn = np.linspace(xmini, xmaxi, int(mt.sqrt(len(clipMag))))
      yn = np.linspace(ymini, ymaxi, int(mt.sqrt(len(clipMag))))
      print(xn, np.shape(xn))
      xn, yn = np.meshgrid(xn, yn)
      x, y = np.reshape(xn, (1,np.shape(xn)[0]*np.shape(xn)[1])), np.reshape(yn, (1,np.shape(yn)[0]*np.shape(yn)[1]))
      
      
      
      res = np.array((x, y, clipMag)).T
      root= tk.Tk()
      canvas1 = tk.Canvas(root, width = 300, height = 300, bg = 'gray1', relief = 'raised')
      canvas1.pack()
      def saveCSV ():
          global df
      
          export_file_path = filedialog.asksaveasfilename( defaultextension=&quot;.csv&quot;, filetypes=[(&quot;CSV files&quot;, '*.csv')])
          np.savetxt(export_file_path, res, delimiter='_')
      
      
      browseButton_CSV = tk.Button(text=&quot;      Export filled CSV Data File     &quot;, command=saveCSV, bg='OrangeRed4', fg='black', font=('helvetica', 12, 'bold'))
      canvas1.create_window(150, 150, window=browseButton_CSV)
      root.mainloop()
  
  while True:
      
      if (xc+45)&gt;=np.max(x):
          if (yc+45)&gt;=np.max(y):
              clipping(x, y, mag, xc, yc)
              break
          else:
              xc = xmin + (90/2)
              yc = yc + 45
      else:
          clipping(x, y, mag, xc, yc)
          xc = xc + 45
  </code></pre>
  <p>The data are in .csv</p>