Hi everyone,

I have defined a custom type to wrap a Python library similarly to what SymPy.jl does. So I will focus on a custom defined for SymPy but essentially the problem is the same for my custom type too.

If I define a symmetric matrix as:

```
using LinearAlgebra, SymPy
x = Matrix{Sym}(undef, 2, 2)
Symmetric(x)
```

the type of the output is `2×2 Symmetric{Any,Array{Sym,2}}`

, while if I defined as

```
Symmetric{eltype(x),typeof(x)}(x, 'L')
```

the return type is `2×2 Symmetric{Sym,Array{Sym,2}}`

.

That means that the `eltype`

in the definition of Symmetric returns type `Any`

. Why is this happening and how can I resolve that? Thanks!