# Question on array of SVectors and \\

**URL:** <https://discourse.julialang.org/t/question-on-array-of-svectors-and/17010>\
**Category:** Numerics\
**Tags:** linearalgebra\
**Created:** [October 31, 2018, 4:41pm UTC](https://discourse.julialang.org/t/question-on-array-of-svectors-and/17010 "2018-10-31T16:41:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cserteGT3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/csertegt3/32/8283_2.png) [@cserteGT3](https://discourse.julialang.org/u/cserteGT3)\
**Post date:** [October 31, 2018, 4:41pm UTC](https://discourse.julialang.org/t/question-on-array-of-svectors-and/17010/1 "2018-10-31T16:41:25Z")

</div>

I’m learning about ICP (Iterative Closest Point) and at this stage try to implement the basics myself (I know about the existing packages).  
I have two arrays of points, that I want to match and therefore I want to compute the homogenous transformation between them. The points are represented with static arrays: `SArray{Tuple{4},Float32,1,4}` (length of 4 because they’re homogenous coordinates), so the arrays of points look like: `Array{SArray{Tuple{4},Float32,1,4},1}`  
I have an equation like: `reading_array * transform_matrix = referenc_array` (the arrays have the same length).  
If I transpose them and try to solve the equation I get the following error:  
`MethodError: no method matching pinv(::Array{SArray{Tuple{4},Float32,1,4},1}, ::SArray{Tuple{4},Float32,1,4})`

My question is, that the method error raises because I have array of arrays instead of matrix? (I read [here](http://juliaarrays.github.io/StaticArrays.jl/stable/pages/api.html) that it’s better to have that way, but it’s possible that I misinterpreted it.) If so, should I use `SMatrix` at a size like (ten)thousands×4?

---

<div class="post-metadata">

**Author:** ![andreasnoack](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andreasnoack/32/27_2.png) [@andreasnoack](https://discourse.julialang.org/u/andreasnoack)\
**Post date:** [October 31, 2018, 7:24pm UTC](https://discourse.julialang.org/t/question-on-array-of-svectors-and/17010/2 "2018-10-31T19:24:12Z")

</div>

It would be useful if you could provide a self contained example that we can run to reproduce the error.

---

<div class="post-metadata">

**Author:** ![tkoolen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkoolen/32/1603_2.png) [@tkoolen](https://discourse.julialang.org/u/tkoolen)\
**Post date:** [October 31, 2018, 8:01pm UTC](https://discourse.julialang.org/t/question-on-array-of-svectors-and/17010/3 "2018-10-31T20:01:57Z")

</div>

> [@cserteGT3](#):
>
> should I use `SMatrix` at a size like (ten)thousands×4

Most likely not. I’d just use regular arrays for this.
