# Supressing/eliminating python wrapping warnings

**URL:** https://discourse.itk.org/t/supressing-eliminating-python-wrapping-warnings/7616
**Category:** Engineering
**Created:** [August 19, 2025, 12:00am UTC](https://discourse.itk.org/t/supressing-eliminating-python-wrapping-warnings/7616 "2025-08-19T00:00:09Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![darrent1974](https://discourse.itk.org/user_avatar/discourse.itk.org/darrent1974/32/4570_2.png) [@darrent1974](https://discourse.itk.org/u/darrent1974)
#### Post date: [August 19, 2025, 12:00am UTC](https://discourse.itk.org/t/supressing-eliminating-python-wrapping-warnings/7616/1 "2025-08-19T00:00:09Z")

</div>

Hi,

I’ve been using a custom build of ITK (v5.4.2) with python wrapping for some time. We also happen to wrap some extra types, image and vector dimensions as part of the build, i.e.,

 ![image](https://discourse.itk.org/uploads/default/original/2X/6/6fc5c27a3f4aac6a5ef5b12d28bda4d0f5a3fa78.png)

When initialising the library from python, we get the following couple of wrapping type warnings, whilst annoying they are harmless.

 ![image](https://discourse.itk.org/uploads/default/original/2X/c/ce2437a351f187cc9078532e8be6c67d4f2f59d1.png)

However, I’ve recently upgraded the build to v5.4.4 and in addition to the itk.FixedArray warnings we’re now getting a bunch of new ones, which I assume related to our use of ITKMontage. See attached text file.

[itk\_warnings.txt](https://discourse.itk.org/uploads/short-url/tUjBH7q6EcOvKgS11H5PdMlvmA9.txt) (13.1 KB)

I tried looking into modifying some wrap files, however haven’t had much success. I’d really like to know if it is possible to eliminate these warnings, or failing that can someone suggest a way we can at least suppress their display?

Regards,

Darren Thompson

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [August 19, 2025, 2:49pm UTC](https://discourse.itk.org/t/supressing-eliminating-python-wrapping-warnings/7616/2 "2025-08-19T14:49:27Z")

</div>

Wrapping code is here:

> <https://github.com/InsightSoftwareConsortium/ITKMontage/blob/main/wrapping/itkTileMergeImageFilter.wrap>

`Warning: Unknown parameter` warnings usually indicate some real problems, so they should not be suppressed.

---

<div class="post-metadata">

### Author: ![darrent1974](https://discourse.itk.org/user_avatar/discourse.itk.org/darrent1974/32/4570_2.png) [@darrent1974](https://discourse.itk.org/u/darrent1974)
#### Post date: [August 20, 2025, 6:55am UTC](https://discourse.itk.org/t/supressing-eliminating-python-wrapping-warnings/7616/3 "2025-08-20T06:55:49Z")

</div>

Hi @dzenanz, thanks for pointing me to the wrap file.

After some experimentation, I think I found a solution by adding an additional double parameter to the template parameter list for the interpolation functions.

For example:

```auto
itk_wrap_template("${ITKM_I${t}${d}}${abbr}" "${ITKT_I${t}${d}}, double, itk::${iif}<${ITKT_I${t}${d}}, double>")

```

I no longer get all the warnings when in python.

FYI, I’ve also created a PR for this at [COMP: Add extra double parameter to InterpolateImageFunction wrapping templates by darrent1974 · Pull Request #236 · InsightSoftwareConsortium/ITKMontage · GitHub](https://github.com/InsightSoftwareConsortium/ITKMontage/pull/236)

BTW, I’d still like to figure out a way to get rid of the itk::FixedArray warnings too.

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [August 20, 2025, 1:05pm UTC](https://discourse.itk.org/t/supressing-eliminating-python-wrapping-warnings/7616/4 "2025-08-20T13:05:23Z")

</div>

What file/compilation unit tries to compile FixedArray? Can you provide a bit of build log around:

```log
Template itk::FixedArray<double,4>
 already defined as <class 'itk.itkFixedArrayPython.itkFixedArrayD4'>
 is redefined as <class 'itk.itkFixedArrayPython.itkFixedArrayD4'>
Warning: template already defined 'itk::FixedArray<double,4>'

```

---

<div class="post-metadata">

### Author: ![darrent1974](https://discourse.itk.org/user_avatar/discourse.itk.org/darrent1974/32/4570_2.png) [@darrent1974](https://discourse.itk.org/u/darrent1974)
#### Post date: [August 21, 2025, 4:18am UTC](https://discourse.itk.org/t/supressing-eliminating-python-wrapping-warnings/7616/5 "2025-08-21T04:18:59Z")

</div>

I think I’ve now found the problem with this one too and have submitted a proposed PR to resolve it. See, [COMP: Add extra check for itk::FixedArray wrapping by darrent1974 · Pull Request #5492 · InsightSoftwareConsortium/ITK · GitHub](https://github.com/InsightSoftwareConsortium/ITK/pull/5492)
