A warning message when plotting 3D cylindrical mesh

Following the code example on http://discretize.simpeg.xyz/en/master/api/generated/discretize.CylindricalMesh.html#discretize.CylindricalMesh, I created a simple 3D cylindrical mesh using the following code:

from SimPEG import Mesh
import numpy as np

dh, nc, npad = 20, 30, 8
nc_theta = 8
hx = [(dh,npad+10,-0.7),(dh,nc),(dh,npad,1.3)]
hy = 2*np.pi/nc_theta * np.ones(nc_theta)
hz = [(dh,npad,-1.3),(dh,nc),(dh,npad,1.3)]
mesh = Mesh.CylMesh([hx,hy,hz],x0="00C")
mesh.plotGrid()

The code ran and I obtained the same figure as shown on the above webpage. But I got a warning message shown below:

I could not figure out what was going on. Any idea? Thanks in advance!

Hi @jsun29,

I am not too sure what the issue is off-hand, but let’s try a couple of things. First, the recommended way to import discretize meshes is to import from discretize directly (rather than SimPEG – this behaviour will be removed down the road).

import discretize
mesh = discretize.CylMesh()

I don’t expect that this would fix the error you are seeing though. I suspect you might be behind on versions. Could you try conda update discretize or share which version of discretize you are currently running?

import discretize
print(discretize.__version__)

Hi @lheagy, thanks for the recommendation! I was following the examples on http://computation.geosci.xyz/case-studies/PF/Kevitsa_Mag_FWR.html and a few other webpages. Looks like these were a little outdated.

I tried that (import discretize) and it did not solve the problem. And my discretize version is 0.4.10. Is it old?

But do not worry much about this. It is just a warning which might disappear once I update everything to the latest version.

Thank you!