# How to assign real/imaginary part of complex array

**URL:** <https://discourse.julialang.org/t/how-to-assign-real-imaginary-part-of-complex-array/10818>\
**Category:** General Usage\
**Created:** [May 10, 2018, 4:29pm UTC](https://discourse.julialang.org/t/how-to-assign-real-imaginary-part-of-complex-array/10818 "2018-05-10T16:29:45Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [May 11, 2018, 2:29am UTC](https://discourse.julialang.org/t/how-to-assign-real-imaginary-part-of-complex-array/10818/11 "2018-05-11T02:29:45Z")

</div>

You’re timing in global scope. You should wrap your code in a function or, even better, just use [GitHub - JuliaCI/BenchmarkTools.jl: A benchmarking framework for the Julia language](https://github.com/JuliaCI/BenchmarkTools.jl)

---

_[View the full topic](https://discourse.julialang.org/t/how-to-assign-real-imaginary-part-of-complex-array/10818)._
