# No output arrays were provided and calculateOutputShape failed to execute INDArray.getWhere()

**URL:** https://community.konduit.ai/t/no-output-arrays-were-provided-and-calculateoutputshape-failed-to-execute-indarray-getwhere/1393
**Category:** ND4J
**Created:** [May 18, 2021, 5:20am UTC](https://community.konduit.ai/t/no-output-arrays-were-provided-and-calculateoutputshape-failed-to-execute-indarray-getwhere/1393 "2021-05-18T05:20:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![masterchief](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@masterchief](https://community.konduit.ai/u/masterchief)
#### Post date: [May 18, 2021, 5:20am UTC](https://community.konduit.ai/t/no-output-arrays-were-provided-and-calculateoutputshape-failed-to-execute-indarray-getwhere/1393/1 "2021-05-18T05:20:41Z")

</div>

I am trying the following code for boolean indexing:

```
    INDArray scalarValues = Nd4j.createFromArray(new int[] {1, 2, 3, 4, 5});
    INDArray values = Nd4j.ones(DataType.INT32, 5);
    INDArray result = scalarValues.getWhere(values, Conditions.greaterThan(0));

```

However, my I get the following errors:

```
Op [choose] failed check for input [0], DataType: [INT32]
Failed to calculate output shapes for op choose

```

The following exception gets thrown as well:  
`org.nd4j.linalg.exception.ND4JIllegalStateException: Op name choose - no output arrays were provided and calculateOutputShape failed to execute`

What am I missing here? In this case, I was expecting to get an empty NDArray back. I had similar errors when trying to use BooleanIndexing.chooseFrom. The documentation there is not particular clear on the semantics of the input parameters, in particular how Condition is supposed to work.
