# Want to contiguously access underlying data of a struct array where the struct is a pair of static arrays

**URL:** https://discourse.julialang.org/t/want-to-contiguously-access-underlying-data-of-a-struct-array-where-the-struct-is-a-pair-of-static-arrays/89012
**Category:** General Usage
**Tags:** question, structarrays
**Created:** [October 20, 2022, 2:25pm UTC](https://discourse.julialang.org/t/want-to-contiguously-access-underlying-data-of-a-struct-array-where-the-struct-is-a-pair-of-static-arrays/89012 "2022-10-20T14:25:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![prittjam](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/prittjam/32/21267_2.png) [@prittjam](https://discourse.julialang.org/u/prittjam)
#### Post date: [October 20, 2022, 2:25pm UTC](https://discourse.julialang.org/t/want-to-contiguously-access-underlying-data-of-a-struct-array-where-the-struct-is-a-pair-of-static-arrays/89012/1 "2022-10-20T14:25:03Z")

</div>

```julia
using StaticArrays, TensorCast

const Point2d{T <: AbstractFloat} = SVector{2,T}

struct PointCspond{T <: AbstractFloat}
    first::Point2d{T}
    second::Point2d{T}
end

function point_csponds(u₁,u₂)
    @cast u₁[j]{i:2} := u₁[i,j]
    @cast u₂[j]{i:2} := u₂[i,j]

    return StructArray{PointCspond{Float64}}((u₁,u₂))
end

x1 = rand(2,100)
x2 = rand(2,100)
pc = point_csponds(u₁,u₂)

```

The type of pc.first is

```julia
100-element reinterpret(SVector{2, Float64}, ::Vector{Float64})

```

but I would like it to be something like a

```julia
2x100 Matrix{Float64} (alias for Array{Float64, 2})

```

Is it possible? Thanks!
