# Vectorized operations with Numpy

**URL:** <https://forum.compas-framework.org/t/vectorized-operations-with-numpy/504>\
**Category:** compas\
**Created:** [August 16, 2021, 12:02pm UTC](https://forum.compas-framework.org/t/vectorized-operations-with-numpy/504 "2021-08-16T12:02:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![solub](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@solub](https://forum.compas-framework.org/u/solub)\
**Post date:** [August 16, 2021, 12:02pm UTC](https://forum.compas-framework.org/t/vectorized-operations-with-numpy/504/1 "2021-08-16T12:02:48Z")

</div>

Hi,

I would like to know if it is possible to do some simple vectorized operations with Numpy using “Remote Procedure Calls”.

I understand that arrays are automatically converted to lists but wouldn’t that make any array manipulation impossible then ?

```auto
from compas.rpc import Proxy

np = Proxy('numpy')

np.ones(10).reshape(5, 2) # --> "list object has no attribute reshape"

np.arange(10) * np.random.uniform(4) # --> ""can't multiply sequence by non-int of type float"

```

---

<div class="post-metadata">

**Author:** ![tomvanmele](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/tomvanmele/32/13_2.png) [@tomvanmele](https://forum.compas-framework.org/u/tomvanmele)\
**Post date:** [August 23, 2021, 6:41am UTC](https://forum.compas-framework.org/t/vectorized-operations-with-numpy/504/2 "2021-08-23T06:41:16Z")

</div>

hi,

that is indeed not possible with `compas.rpc`.  
the objectives of our RPCs is not necessarily to make all functionality of CPython packages like Numpy available in IronPython, but rather to make sure that you can run algorithms based on such packages directly from Rhino/GH.

is there a particular application of the above you have in mind? or just playing around to see what is possible?

---

<div class="post-metadata">

**Author:** ![solub](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@solub](https://forum.compas-framework.org/u/solub)\
**Post date:** [September 5, 2021, 6:13pm UTC](https://forum.compas-framework.org/t/vectorized-operations-with-numpy/504/3 "2021-09-05T18:13:46Z")

</div>

_(My apologies for the late reply)_

Thank you for your reply. Had nothing specific in mind, I was just trying to figure out if `rpc` could allow to do some vectorized operations within a non-CPython based environement. That would have been neat !
