# Type conversion

**URL:** <https://discourse.julialang.org/t/type-conversion/128012>\
**Category:** General Usage\
**Tags:** question, package, arrow\
**Created:** [April 12, 2025, 8:31pm UTC](https://discourse.julialang.org/t/type-conversion/128012 "2025-04-12T20:31:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [April 12, 2025, 8:31pm UTC](https://discourse.julialang.org/t/type-conversion/128012/1 "2025-04-12T20:31:29Z")

</div>

After reading an arrow file I get the following type:

```julia
julia> sl.heading
200-element Arrow.Primitive{Float32, Vector{Float32}}:
 -0.0023596277
 -0.004771689
 -0.0052604624
  ⋮
 -0.31095406
 -0.33066812
 -0.338615

```

If I want to plot it using PyPlot I need to apply collect, which is bad because it allocates.

Is there a way to convert this into a type that PyPlot.jl can handle without copying?

---

<div class="post-metadata">

**Author:** ![PeterSimon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petersimon/32/25193_2.png) [@PeterSimon](https://discourse.julialang.org/u/PeterSimon)\
**Post date:** [April 13, 2025, 7:45pm UTC](https://discourse.julialang.org/t/type-conversion/128012/2 "2025-04-13T19:45:50Z")

</div>

Try this:

```julia
heading = sl.heading.data

```

and then use `heading` in your `PyPlot` call.
