# Julia bug using numpy

**URL:** https://discourse.julialang.org/t/julia-bug-using-numpy/60636
**Category:** Tooling
**Tags:** pycall, bug, array, python, arrays
**Created:** [May 6, 2021, 10:08am UTC](https://discourse.julialang.org/t/julia-bug-using-numpy/60636 "2021-05-06T10:08:41Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![At.Tahiri](https://avatars.discourse-cdn.com/v4/letter/a/7bcc69/32.png) [@At.Tahiri](https://discourse.julialang.org/u/At.Tahiri)
#### Post date: [May 6, 2021, 10:08am UTC](https://discourse.julialang.org/t/julia-bug-using-numpy/60636/1 "2021-05-06T10:08:41Z")

</div>

Hello,

I want to report a bug in julia used with numpy argmax function.

(The numpy.argmax() is a function that returns indices of the max element of the array in a particular axis.)

In the example below np.argmax returns 0 which makes Julia crash.

using PyCall  
np = pyimport(“numpy”)  
a = [100,2,3,40,5]

println(np.max(a))# print 100  
println(a[np.argmax(a)]) # crash

Best regards,

---

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [May 6, 2021, 10:11am UTC](https://discourse.julialang.org/t/julia-bug-using-numpy/60636/2 "2021-05-06T10:11:14Z")

</div>

Hi there!

1. This is intended behavior. Use `a[np.argmax(a) + 1]` to convert from 0-indexed to 1-index.
2. Why use numpy? Julia has everything and more…
