# Error message: asarray not defined

**URL:** <https://discourse.psychopy.org/t/error-message-asarray-not-defined/20996>\
**Category:** Online experiments\
**Tags:** pavlovia\
**Created:** [March 4, 2021, 5:16pm UTC](https://discourse.psychopy.org/t/error-message-asarray-not-defined/20996 "2021-03-04T17:16:52Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![thomas\_pronk](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/thomas_pronk/32/9531_2.png) [@thomas\_pronk](https://discourse.psychopy.org/u/thomas_pronk)\
**Post date:** [March 16, 2021, 7:56pm UTC](https://discourse.psychopy.org/t/error-message-asarray-not-defined/20996/3 "2021-03-16T19:56:18Z")

</div>

Hey!

numpy.asarrary is a bit tricky, since it can perform a lot of different kinds of conversions. I would recommend writing a special solution for your cases.

setOri in PsychoJS takes a single number: [JSDoc: Source: visual/VisualStim.js](https://psychopy.github.io/psychojs/visual_VisualStim.js.html#line141)

So what you could try is, first write the value you’re trying to convert to the log to see what it looks like (see [https://run.pavlovia.org/tpronk/tutorial\_js\_console\_log](https://run.pavlovia.org/tpronk/tutorial_js_console_log)), then pluck out the right value.

Best, Thomas

---

_[View the full topic](https://discourse.psychopy.org/t/error-message-asarray-not-defined/20996)._
