# Eye in julia 0.7

**URL:** <https://discourse.julialang.org/t/eye-in-julia-0-7/9820>\
**Category:** New to Julia\
**Created:** [March 19, 2018, 5:30pm UTC](https://discourse.julialang.org/t/eye-in-julia-0-7/9820 "2018-03-19T17:30:21Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [March 19, 2018, 6:02pm UTC](https://discourse.julialang.org/t/eye-in-julia-0-7/9820/4 "2018-03-19T18:02:24Z")

</div>

You can just use `one(A)` or `oneunit(A)` (depending on how you want to handle the dimensionful case) for the equivalent of `eye(A)` for square matrices.

(`eye` also worked for non-square matrices, but I don’t know of a non-verbose equivalent on 0.7.)

---

_[View the full topic](https://discourse.julialang.org/t/eye-in-julia-0-7/9820)._
