# A\[2,:\] = 5;

**URL:** https://discourse.julialang.org/t/a-2-5/16278
**Category:** General Usage
**Created:** [October 13, 2018, 4:33pm UTC](https://discourse.julialang.org/t/a-2-5/16278 "2018-10-13T16:33:56Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![janrpeters](https://avatars.discourse-cdn.com/v4/letter/j/d26b3c/32.png) [@janrpeters](https://discourse.julialang.org/u/janrpeters)
#### Post date: [October 13, 2018, 4:33pm UTC](https://discourse.julialang.org/t/a-2-5/16278/1 "2018-10-13T16:33:56Z")

</div>

I have code with a lot of statements like

A = zeros(Float64,10,10);  
A[2,:] = 5;

which worked fine in Julia 0.6.2. It gets this error message:

MethodError: no method matching setindex\_shape\_check(::Int64, ::Int64, ::Int64)  
Closest candidates are:  
setindex\_shape\_check(!Matched::AbstractArray{#s57,1} where #s57, ::Integer, ::Integer) at indices.jl:221  
setindex\_shape\_check(!Matched::AbstractArray{#s57,2} where #s57, ::Integer, ::Integer) at indices.jl:225  
setindex\_shape\_check(!Matched::AbstractArray, ::Integer…) at indices.jl:179  
…

in Julia 1.0.1.  
Is there still a way to do this in Julia 1.x? Thanks!

---

<div class="post-metadata">

### Author: ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)
#### Post date: [October 13, 2018, 4:34pm UTC](https://discourse.julialang.org/t/a-2-5/16278/2 "2018-10-13T16:34:21Z")

</div>

Use .= instead of =

---

<div class="post-metadata">

### Author: ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)
#### Post date: [October 13, 2018, 4:53pm UTC](https://discourse.julialang.org/t/a-2-5/16278/3 "2018-10-13T16:53:06Z")

</div>

Another comment that is important here. If you are updating code to work with Julia v1.0, please consider updating the code with Julia v0.7. It will show you all the changes you need to do instead of this cryptic error message.

---

<div class="post-metadata">

### Author: ![janrpeters](https://avatars.discourse-cdn.com/v4/letter/j/d26b3c/32.png) [@janrpeters](https://discourse.julialang.org/u/janrpeters)
#### Post date: [October 13, 2018, 5:55pm UTC](https://discourse.julialang.org/t/a-2-5/16278/4 "2018-10-13T17:55:34Z")

</div>

Thanks!
