enthought / enthought/mayavi

CPU freeze with filled contours for array with nans

Open
#67 8 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
1.4k
Forks
316
Avg merge
7h 44m
Merged PRs (30d)
5

Description

If I draw with `mlab.surf(z)`, and change surface preferences to contours, I get line contours as expected. If I set filled contours CPU is maxed and process never finishes. `z` is array with nans, and I guess that's the reason for this behavior as otherwise filled contours works fine.

For example:

``` python
array([[ -2. , 2. , -3.4, -3.5, -3.1, -2.9, -5.2, 0. , -0.7,
-3. , -3. , -4.7, -2.7, 1.8, 4.2, 6.6, 5.3, 1.9,
7.1, 10.1, 8.2, 16.5, 10.3, 10.3, 10.2, 11.3, 6.6,
8.2, 7.9, 4.7, 4.1],
[ 5.2, 8.1, 10.1, 17.4, 17. , 12.1, 15.7, 13.1, 7.8,
8.4, 12.1, 4.9, 2.8, 2.7, 2.3, 2.7, 3.3, 5.2,
0.3, 0.9, 2.8, 2.3, 2.7, 5.4, 6.5, 6.8, 9.2,
9.2, nan, nan, nan],
[ 14.7, 14.2, 10.7, 12.4, 12.4, 14. , 11. , 9.4, 13. ,
9.2, 11.4, 7.3, 10.3, 8.4, 12.5, 11. , 8.5, 8.7,
8.9, 0. , 1.2, 3.8, 6.8, 8. , 1.7, 6.1, 12.5,
15.1, 15.4, 18.4, 20.5],
[ 19.7, 22.1, 17.7, 19.8, 21.6, 21.3, 20.9, 21.3, 22.4,
22.6, 21.4, 20.8, 11.5, 10.7, 15.7, 21.2, 23.5, 18.3,
17.7, 18.9, 18.4, 11.6, 16.8, 18.5, 19.9, 18. , 18.2,
15.2, 16.5, 15.1, nan],
[ 12. , 19. , 18.7, 21.2, 16.7, 20.3, 18.8, 22.7, 26. ,
26.9, 27.2, 27.2, 27.9, 26. , 28.1, 26.9, 27.6, 26. ,
27.1, 28.5, 27.4, 28.7, 29.5, 30. , 27.3, 25.4, 26.7,
25. , 13.3, 12.4, 22. ],
[ 23.9, 25.7, 20.9, 24.6, 26.2, 27.8, 30. , 28.8, 31.4,
32.6, 31.4, 25.1, 24.6, 25.9, 29.1, 31.9, 29.1, 25. ,
28.8, 31.5, 26. , 21.3, 24. , 18. , 20.1, 24.9, 20. ,
27.6, 27.9, 27.4, nan],
[ 27. , 28.7, 28.5, 28.8, 28.8, 28.3, 27.9, 31.2, 27.9,
24.7, 20.8, 23.2, 26.3, 29.5, 33. , 33.7, 33. , 34. ,
26.6, 27.1, 28.7, 31.2, 32.9, 36.1, 37.4, 27.5, 29. ,
30.7, 32.1, 32.1, 32.5],
[ 32.8, 34.5, 34.6, 34.3, 28.6, 25.6, 21.1, 29.3, 28.1,
29.5, 29. , 23.7, 28.8, 30.5, 28.6, 29.5, 31.3, 31.6,
31.9, 31.5, 31.5, 31.3, 30.8, 26.7, 26.5, 30.2, 31.2,
32. , 32.3, 27.2, 26.8],
[ 28.2, 30.2, 31.6, 32.9, 33.3, 19.3, 18.4, 20.8, 24.3,
26.6, 26.2, 20.4, 22.9, 23.8, 26.4, 28.5, 25.8, 26.9,
23.4, 25.2, 24.6, 24.6, 25.1, 26.7, 21.5, 24.8, 25.1,
24.7, 25.6, 26.6, nan],
[ 27.8, 23.4, 12.2, 18.8, 24.5, 24.3, 25.3, 25.4, 26. ,
27.1, 25.6, 22.4, 11.7, 12.2, 12.8, 6.5, 11.4, 8.1,
9.7, 12.4, 13.3, 15.7, 19. , 16.1, 19.1, 20.9, 16.8,
16.1, 16.7, 11.8, 9.5],
[ 9.8, 8. , 4.7, 10.8, 7.7, 19.3, 17.9, 15.8, 12.7,
13.2, 10.4, 13.4, 14. , 13.3, 10.9, 13.9, 16.7, 13.4,
13. , 15.2, 13.6, 13. , 12.3, 11.8, 15.1, 12.8, 9.1,
8.9, 9. , 4.9, nan],
[ 13.5, 14.3, 11.6, 10.7, 11. , 10.2, 10.6, 11. , 8.5,
8.1, 7.4, 1.6, 4.5, 3.4, 5. , 3.1, 5.2, -0.6,
-2.6, -2.2, -4.8, -2.5, 5.3, 2.6, 14.4, 14.1, 9.9,
6.8, 9.1, 5.7, 11.2]])
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.