# vtkXdmfWriter does not write correctly for vtkPythonAlgorithm

**URL:** https://discourse.vtk.org/t/vtkxdmfwriter-does-not-write-correctly-for-vtkpythonalgorithm/862
**Category:** Support
**Tags:** file-formats
**Created:** [April 28, 2019, 7:30pm UTC](https://discourse.vtk.org/t/vtkxdmfwriter-does-not-write-correctly-for-vtkpythonalgorithm/862 "2019-04-28T19:30:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![amit112amit](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amit112amit/32/2094_2.png) [@amit112amit](https://discourse.vtk.org/u/amit112amit)
#### Post date: [April 28, 2019, 7:30pm UTC](https://discourse.vtk.org/t/vtkxdmfwriter-does-not-write-correctly-for-vtkpythonalgorithm/862/1 "2019-04-28T19:30:41Z")

</div>

I wrote a custom Filter by subclassing `VTKPythonAlgorithmBase` following [this](https://blog.kitware.com/vtkpythonalgorithm-is-great/) link. When I write the output using `vtkXMLPolyDataWriter` class, I get correct points, lines and point-data vectors. I confirmed it by opening the output file in ParaView. But when I use `vtkXdmfWriter` (from `vtkmodules.vtkIOXdmf2`) using `vtkXdmfWriter.WriteAllTimeStepsOn()` followed by `Write()`, all my point-data vector arrays become scalar arrays i.e. their shape changes from (50, 3) to (150,). The connectivity of cells also gets messed up. My suspicion is that in my custom filter I am not setting some meta data that the `vtkXdmfWriter` might need. Does anyone know where I can find this information?
