# ModelingToolkit and normalize()

**URL:** https://discourse.julialang.org/t/modelingtoolkit-and-normalize/107349
**Category:** General Usage
**Tags:** question, package, modelingtoolkit
**Created:** [December 8, 2023, 9:58pm UTC](https://discourse.julialang.org/t/modelingtoolkit-and-normalize/107349 "2023-12-08T21:58:43Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![SteffenPL](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/steffenpl/32/206270_2.png) [@SteffenPL](https://discourse.julialang.org/u/SteffenPL)
#### Post date: [December 9, 2023, 5:35am UTC](https://discourse.julialang.org/t/modelingtoolkit-and-normalize/107349/2 "2023-12-09T05:35:13Z")

</div>

You could replace `normalize` with `pos ./ norm(pos)` to get rid of the error.

The problem seems to be that `isempty(::Symbolics.Arr{Num,1})` or in your case `isempty(pos)` (which is called inside `normalize`) returns a `Num` instead of a `Bool`. Not sure if that is a feature or a bug, I suspect it is a feature for other aspects.

---

_[View the full topic](https://discourse.julialang.org/t/modelingtoolkit-and-normalize/107349)._
