# Why \`eye\` has been deprecated?

**URL:** <https://discourse.julialang.org/t/why-eye-has-been-deprecated/12824>\
**Category:** Internals & Design\
**Created:** [August 2, 2018, 2:12pm UTC](https://discourse.julialang.org/t/why-eye-has-been-deprecated/12824 "2018-08-02T14:12:13Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Post date:** [August 2, 2018, 2:56pm UTC](https://discourse.julialang.org/t/why-eye-has-been-deprecated/12824/6 "2018-08-02T14:56:45Z")

</div>

This has been discussed on here before on this thread:

> [@Eye in julia 0.7](https://discourse.julialang.org/t/eye-in-julia-0-7/9820):
>
> I think I found a replacement for eye in julia 7.0 julia\> c=rand(Int8,4,4) 4×4 Array{Int8,2}: 44 -79 36 116 -14 -64 -49 -52 77 -110 -20 118 -119 -57 -78 90 julia\> @btime Matrix{eltype($c)}(I,size($c)) 47.614 ns (1 allocation: 112 bytes) 4×4 Array{Int8,2}: 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 julia\> @btime $c^0 33.817 ns (1 allocation: 112 bytes) 4×4 Array{Int8,2}: 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 Am I right? Is c^0 a good replacement fo…

---

_[View the full topic](https://discourse.julialang.org/t/why-eye-has-been-deprecated/12824)._
