enthought / enthought/mayavi

tvtk BitArray returns error with from_array having components, but generates side effect.

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

Description

I find this behavior a bit suspicious...
```
>>> a=tvtk.BitArray()
>>> a
[]
>>> a.number_of_components
1
>>> a.from_array([(0, 0, 0),(1,1,1)])
ERROR: In /home/vagrant/pisi/tmp/VTK-5.10.1-3/work/VTK5.10.1/Common/vtkDataArray.cxx, line 942
vtkBitArray (0x1e93ec0): Number of tuples in 'from' (2) and 'to' (0) do not match.

ERROR: In /home/vagrant/pisi/tmp/VTK-5.10.1-3/work/VTK5.10.1/Common/vtkDataArray.cxx, line 942
vtkBitArray (0x1e93ec0): Number of tuples in 'from' (2) and 'to' (0) do not match.

ERROR: In /home/vagrant/pisi/tmp/VTK-5.10.1-3/work/VTK5.10.1/Common/vtkDataArray.cxx, line 942
vtkBitArray (0x1e93ec0): Number of tuples in 'from' (2) and 'to' (0) do not match.

>>> a.number_of_components
3
>>> a
[]
>>> a.from_array([(0, 0, 0),(1,1,1)])
>>> a
[(0.0, 0.0, 0.0), (1.0, 1.0, 1.0)]
>>> a.number_of_components
3
```

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.