# Calculator and texture coordinates

**URL:** https://discourse.paraview.org/t/calculator-and-texture-coordinates/629
**Category:** ParaView Support
**Created:** [September 25, 2018, 6:15am UTC](https://discourse.paraview.org/t/calculator-and-texture-coordinates/629 "2018-09-25T06:15:12Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [October 4, 2018, 3:42pm UTC](https://discourse.paraview.org/t/calculator-and-texture-coordinates/629/7 "2018-10-04T15:42:57Z")

</div>

Ah! Two issues:

1. calculator filter is producing 3-component arrays alone, even when 2 component was requested.
2. 3-component tcoords don’t correctly map 2D texture images.

Solution is to use Python Progammable filter instead. I applied a Python Programmable filter with the following script after your Calculator filter and then things worked as expected.

```python
output.PointData.append(inputs[0].PointData["Result"][:,0:1], "Result2")
output.PointData.SetActiveTCoords("Result2")

```

You can totally ditch the Calculator and just update the expression in the Programmable Filter instead, as well.

---

_[View the full topic](https://discourse.paraview.org/t/calculator-and-texture-coordinates/629)._
