# Reinterpret interleaved real and imaginary numbers to an Abstract Vector

**URL:** <https://discourse.julialang.org/t/reinterpret-interleaved-real-and-imaginary-numbers-to-an-abstract-vector/134033>\
**Category:** General Usage\
**Created:** [November 21, 2025, 4:11pm UTC](https://discourse.julialang.org/t/reinterpret-interleaved-real-and-imaginary-numbers-to-an-abstract-vector/134033 "2025-11-21T16:11:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jake](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jake/32/46007_2.png) [@Jake](https://discourse.julialang.org/u/Jake)\
**Post date:** [November 21, 2025, 4:11pm UTC](https://discourse.julialang.org/t/reinterpret-interleaved-real-and-imaginary-numbers-to-an-abstract-vector/134033/1 "2025-11-21T16:11:08Z")

</div>

I am reading interleaved complex data as (abscissa, real, imaginary) numbers in one vector. Elements 1, 4 ,7, … are the abscissa, and elements (2,3), (4,5), … are the (real, imaginary) components of the complex numbers. I would like to have a result of abscissa and ordinate, where the abscissa is a `real` vector and the ordinate is a `complex` vector. I am part way there, with the MWE

```julia-auto
julia> _data = rand(3*10);

julia> tmp = reshape(reinterpret(Float32, _data), (3, :))';

julia> abscissa = tmp[:, 1];

julia> data = reinterpret(ComplexF32, reshape(tmp[:, 2:3]', (:, 1)));

julia> isa(data, AbstractVector)
false

julia> isa(abscissa, AbstractVector)
true

```

How can I get Julia to recognize `data` as an `AbstractVector`?

---

<div class="post-metadata">

**Author:** ![araujoms](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/araujoms/32/217734_2.png) [@araujoms](https://discourse.julialang.org/u/araujoms)\
**Post date:** [November 21, 2025, 4:19pm UTC](https://discourse.julialang.org/t/reinterpret-interleaved-real-and-imaginary-numbers-to-an-abstract-vector/134033/2 "2025-11-21T16:19:10Z")

</div>

The problem is that your `data` is an `AbstractMatrix`. What you want to do is

```julia-auto
data = reinterpret(ComplexF32, vec(tmp[:, 2:3]'));

```
