# How to save a vertex data in 2D numpy array into a text vtk file in Python?

**URL:** https://discourse.vtk.org/t/how-to-save-a-vertex-data-in-2d-numpy-array-into-a-text-vtk-file-in-python/1973
**Category:** Support
**Created:** [October 24, 2019, 11:26pm UTC](https://discourse.vtk.org/t/how-to-save-a-vertex-data-in-2d-numpy-array-into-a-text-vtk-file-in-python/1973 "2019-10-24T23:26:35Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![leonard-oz](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/l/a88e57/32.png) [@leonard-oz](https://discourse.vtk.org/u/leonard-oz)
#### Post date: [October 24, 2019, 11:26pm UTC](https://discourse.vtk.org/t/how-to-save-a-vertex-data-in-2d-numpy-array-into-a-text-vtk-file-in-python/1973/1 "2019-10-24T23:26:35Z")

</div>

Dear VTK experts:

I have a mesh vertex data which is in 2D numpy array format, how could I save it into a text vtk file in Python? Sorry I am very new to VTK .

Thanks.

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [October 25, 2019, 3:24pm UTC](https://discourse.vtk.org/t/how-to-save-a-vertex-data-in-2d-numpy-array-into-a-text-vtk-file-in-python/1973/2 "2019-10-25T15:24:32Z")

</div>

The [pvyvtk package](https://github.com/pearu/pyvtk) might have what you need (pip install pyvtk).
