# How to open ".npy" file or convert ".npy" file to Paraview format?

**URL:** https://discourse.paraview.org/t/how-to-open-npy-file-or-convert-npy-file-to-paraview-format/5105
**Category:** ParaView Support
**Created:** [August 14, 2020, 9:58am UTC](https://discourse.paraview.org/t/how-to-open-npy-file-or-convert-npy-file-to-paraview-format/5105 "2020-08-14T09:58:51Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![rasunag27](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rasunag27/32/4636_2.png) [@rasunag27](https://discourse.paraview.org/u/rasunag27)
#### Post date: [August 14, 2020, 9:58am UTC](https://discourse.paraview.org/t/how-to-open-npy-file-or-convert-npy-file-to-paraview-format/5105/1 "2020-08-14T09:58:51Z")

</div>

Dear all,

I have a 3-dimensional volume array of size (64, 64, 64) which has an extension of “.npy”. I wanted to visualize in paraview so that I can do post-processing work from the software.

1. Since, paraview does not support “.npy” file extension directly, how do I open it?

2. I converted “.npy” file to “.raw” file extension and opened in ParaView with proper assignment of  
a. File Dimensionality: 3  
b. Data Extent: 0-64, 0-64, 0-64  
c. Data Scalar type: Unsigned char(int8).  
All I could see is a cube of (64_64_64). But the volume is of different model.

3. How do I convert “.npy” file to paraview readable extension?

Thanks and Regards,

Sunag R A.

---

<div class="post-metadata">

### Author: ![Dave\_DeMarle](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dave_demarle/32/27_2.png) [@Dave\_DeMarle](https://discourse.paraview.org/u/Dave_DeMarle)
#### Post date: [August 14, 2020, 10:08pm UTC](https://discourse.paraview.org/t/how-to-open-npy-file-or-convert-npy-file-to-paraview-format/5105/2 "2020-08-14T22:08:45Z")

</div>

That format is Python numpy’s compressed data format. It would be really nice to have a builtin reader for it.

Since there isn’t yet, I suggest a Python programmable source. It will have to get the word type and dimensions in request information, and pass down the values into a vtkImageData output in the script (IE request data) function.

If you hunt around in the cinema source code you can find examples for 2d images.
