# Need help displaying processed NumPy array properly.

**URL:** https://discourse.vtk.org/t/need-help-displaying-processed-numpy-array-properly/3499
**Category:** Support
**Tags:** file-formats
**Created:** [June 9, 2020, 11:20am UTC](https://discourse.vtk.org/t/need-help-displaying-processed-numpy-array-properly/3499 "2020-06-09T11:20:02Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![rishyak](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/r/b4bc9f/32.png) [@rishyak](https://discourse.vtk.org/u/rishyak)
#### Post date: [June 9, 2020, 11:20am UTC](https://discourse.vtk.org/t/need-help-displaying-processed-numpy-array-properly/3499/1 "2020-06-09T11:20:02Z")

</div>

I have a model that uses NumPy arrays. The inputs and outputs are those arrays.

I want to display this on a webpage and I’m struggling with that.

I believe the problem I’m facing is that out model uses marching cubes which is based on vectors but VTK uses scalars. Because of that, I’m getting a cuboid instead of a lung, that I should be getting.

I restarted, using this as a wireframe but I’m still getting a block. I have tried opacity and colour settings but the block doesn’t go. I guess that my code is quite literally displaying the NumPy array instead of what I want from it.

PyVista gives me a lung but it’s not flawless either.

Please let me know how I can properly display my NumPy array. If not, how can I convert it to a VTK object or a VTK array and how can I display that?

Thank you.

---

<div class="post-metadata">

### Author: ![Yibo\_Wu](https://discourse.vtk.org/user_avatar/discourse.vtk.org/yibo_wu/32/3650_2.png) [@Yibo\_Wu](https://discourse.vtk.org/u/Yibo_Wu)
#### Post date: [July 8, 2021, 3:35pm UTC](https://discourse.vtk.org/t/need-help-displaying-processed-numpy-array-properly/3499/2 "2021-07-08T15:35:44Z")

</div>

Hi @rishyak, I guess you can find your answer on [stack overflow](https://stackoverflow.com/questions/15749100/exporting-a-3d-numpy-to-a-vtk-file-for-viewing-in-paraview-mayavi)
