# How to convert element type of a container?

**URL:** <https://discourse.julialang.org/t/how-to-convert-element-type-of-a-container/20293>\
**Category:** General Usage\
**Tags:** question, array, type, convert\
**Created:** [January 30, 2019, 9:35pm UTC](https://discourse.julialang.org/t/how-to-convert-element-type-of-a-container/20293 "2019-01-30T21:35:15Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![tkoolen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkoolen/32/1603_2.png) [@tkoolen](https://discourse.julialang.org/u/tkoolen)\
**Post date:** [January 30, 2019, 9:53pm UTC](https://discourse.julialang.org/t/how-to-convert-element-type-of-a-container/20293/2 "2019-01-30T21:53:08Z")

</div>

Define a `StaticArrays.similar_type` method for your `FieldVector`. See [Is there a way to seamlessly inherit vector arithmetic on new types? - #9 by tkoolen](https://discourse.julialang.org/t/is-there-a-way-to-seamlessly-inherit-vector-arithmetic-on-new-types/19713/9).

---

_[View the full topic](https://discourse.julialang.org/t/how-to-convert-element-type-of-a-container/20293)._
