# How to use \`jl\_ptr\_to\_array\`?

**URL:** https://discourse.julialang.org/t/how-to-use-jl-ptr-to-array/112834
**Category:** General Usage
**Tags:** embedding
**Created:** [April 11, 2024, 3:40pm UTC](https://discourse.julialang.org/t/how-to-use-jl-ptr-to-array/112834 "2024-04-11T15:40:28Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dmitry-kabanov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dmitry-kabanov/32/52639_2.png) [@dmitry-kabanov](https://discourse.julialang.org/u/dmitry-kabanov)
#### Post date: [April 11, 2024, 3:40pm UTC](https://discourse.julialang.org/t/how-to-use-jl-ptr-to-array/112834/1 "2024-04-11T15:40:28Z")

</div>

Hi, I have difficulties with the correct usage of the function `jl_ptr_to_array`. Particularly, there is no explanation in the documentation on embedding, neighter in the source code on how to construct the third argument to this function, `dims`.

So, the function has the following signature:

```julia
jl_array_t *jl_ptr_to_array(jl_value_t *atype, void *data,
                                         jl_value_t *_dims, int own_buffer)

```

By miracle, I was able to find somewhere on the internet how to construct `atype` (array type), but I cannot understand how to construct `_dims`? And cannot find it.
