# vtk 9.5 q: what is proper way to create Python vtkDataSet object from C++ address

**URL:** <https://discourse.vtk.org/t/vtk-9-5-q-what-is-proper-way-to-create-python-vtkdataset-object-from-c-address/15712>\
**Category:** Support\
**Tags:** python\
**Created:** [June 6, 2025, 8:35pm UTC](https://discourse.vtk.org/t/vtk-9-5-q-what-is-proper-way-to-create-python-vtkdataset-object-from-c-address/15712 "2025-06-06T20:35:20Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [June 6, 2025, 10:34pm UTC](https://discourse.vtk.org/t/vtk-9-5-q-what-is-proper-way-to-create-python-vtkdataset-object-from-c-address/15712/2 "2025-06-06T22:34:42Z")

</div>

Sigh. This feature was a casualty of the new numpy integration that was added to VTK. Read more here: [Why is vtkmodules.util.data\_model overriding by default?](https://discourse.vtk.org/t/why-is-vtkmodules-util-data-model-overriding-by-default/14924)

You can still do it, but the address cannot be the address of a VTK data object. Which makes the feature much less useful, I know…

There is a work-around. You can disable VTK’s new numpy-friendly data object overrides by adding the following lines to the top of your program, before your “import vtk” statement:

```python
# disable automatic VTK data object overrides
import vtkmodules
vtkmodules.MODULE_MAPPER = {}

```

This will work in VTK 9.4 and VTK 9.5. I’m not sure if it will continue to work in 9.6 and onward.

---

_[View the full topic](https://discourse.vtk.org/t/vtk-9-5-q-what-is-proper-way-to-create-python-vtkdataset-object-from-c-address/15712)._
