# Number of Dimensions Must be a Positive Number error

**URL:** <https://uqworld.org/t/number-of-dimensions-must-be-a-positive-number-error/1532>\
**Category:** Community Q&A and How To\
**Created:** [March 21, 2022, 5:30pm UTC](https://uqworld.org/t/number-of-dimensions-must-be-a-positive-number-error/1532 "2022-03-21T17:30:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Uche\_A](https://uqworld.org/user_avatar/uqworld.org/uche_a/32/696_2.png) [@Uche\_A](https://uqworld.org/u/Uche_A)\
**Post date:** [March 21, 2022, 5:30pm UTC](https://uqworld.org/t/number-of-dimensions-must-be-a-positive-number-error/1532/1 "2022-03-21T17:30:48Z")

</div>

I am trying to scale my UQlab Inversion for larger problems with multiple (space dependent) outputs. I have stacked two output variables to end up with N\_{outputs} = 1534.  
Before doing any advanced analysis, I wanted to use the default settings of the Inversion tool to test before making any adjustments for advanced sampling. I have created a PCE model as my forward model with 1534 coefficients. All other settings are the default. However, when I try to start the inversion, I get the error “Number of dimensions must be a positive scalar integer between 1 and 1111”. The forward model itself is dependend on only 5 parameters.  
How can I proceed with fixing this small error? When I try to look under the hood, I get val = 1539 line 197 of the qrandset function file. My assumption is, it is trying to sample 1539 parameters. I would appreciate any assistance to proceed properly. thank you.

---

<div class="post-metadata">

**Author:** ![giansteve](https://uqworld.org/user_avatar/uqworld.org/giansteve/32/973_2.png) [@giansteve](https://uqworld.org/u/giansteve)\
**Post date:** [March 22, 2022, 7:35am UTC](https://uqworld.org/t/number-of-dimensions-must-be-a-positive-number-error/1532/2 "2022-03-22T07:35:51Z")

</div>

Hi @Uche_A,

Could you paste your code that produces the error?  
I am sure it is simply a dimension problem, but it would be easier to identify it with some code.  
Thank you 🙂  
Gian

---

<div class="post-metadata">

**Author:** ![Uche\_A](https://uqworld.org/user_avatar/uqworld.org/uche_a/32/696_2.png) [@Uche\_A](https://uqworld.org/u/Uche_A)\
**Post date:** [October 17, 2023, 12:28pm UTC](https://uqworld.org/t/number-of-dimensions-must-be-a-positive-number-error/1532/3 "2023-10-17T12:28:39Z")

</div>

I am sorry for the very late response, yes it was a dimension problem. in case anyone experiences this problem too.
