mayavi2 crashing Python for some functions in macOS Sierra
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 316
- Avg merge
- 7h 44m
- Merged PRs (30d)
- 5
Description
I am running on an iMac 21.5 inch, Mid 2011 model running macOS Sierra 10.12.1. I have had some problems with Mayavi, specifically, when using either scalar_cut_plane or vector_cut_plane, it crashes Python. I have included a simple script that I took from the Enthought documentation pages on Mayavi2. Two of the examples work just fine; quiver3d and pipeline.vector_field. But not the vector_cut_plane which crashes Python. The same thing happens on my macBook Pro, Retina, 15-inch, Late 2013 also running macOS Sierra 10.12.1. The Mac consiole error log is similar for both machines so the problem is unlikely to be hardware and is more likely to be something with macOS Sierra (or Mayavi2)
`from mayavi import mlab
import numpy as np
x, y, z = np.mgrid[0:1:20j, 0:1:20j, 0:1:20j]
u = np.sin(np.pi*x) * np.cos(np.pi*z)
v = -2*np.sin(np.pi*y) * np.cos(2*np.pi*z)
w = np.cos(np.pi*x)*np.sin(np.pi*z) + np.cos(np.pi*y)*np.sin(2*np.pi*z)
# This works
mlab.figure(1,bgcolor=(1,1,1),fgcolor=(0,0,0),size=(800,700))
mlab.quiver3d(u, v, w)
mlab.outline()
#This works
mlab.figure(2,bgcolor=(1,1,1),fgcolor=(0,0,0),size=(800,700))
src = mlab.pipeline.vector_field(u, v, w)
mlab.pipeline.vectors(src, mask_points=20, scale_factor=3.)
mlab.outline()
#This crashes Python (scalar_cut_plane will crash it as well)
mlab.figure(3,bgcolor=(1,1,1),fgcolor=(0,0,0),size=(800,700))
mlab.pipeline.vector_cut_plane(src, mask_points=2, scale_factor=3)`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.