# QHACK Pennylane 101 Finite difference

**URL:** <https://discuss.pennylane.ai/t/qhack-pennylane-101-finite-difference/1673>\
**Category:** PennyLane Help\
**Created:** [February 17, 2022, 4:21am UTC](https://discuss.pennylane.ai/t/qhack-pennylane-101-finite-difference/1673 "2022-02-17T04:21:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![qreg](https://avatars.discourse-cdn.com/v4/letter/q/bbe5ce/32.png) [@qreg](https://discuss.pennylane.ai/u/qreg)\
**Post date:** [February 17, 2022, 4:21am UTC](https://discuss.pennylane.ai/t/qhack-pennylane-101-finite-difference/1673/1 "2022-02-17T04:21:39Z")

</div>

Hi, I am stuck on the finite difference challenge in QHACK. Trying to index the array params gives me an error that the array is 0-dimensional (and cannot therefore be addressed by indices). But then in the method “variational circuit”, the array is indexed: params[0], etc. So, maybe it is not it.

In other words: Any hints how to approach the challenge?

---

<div class="post-metadata">

**Author:** ![CatalinaAlbornoz](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/catalinaalbornoz/32/1196_2.png) [@CatalinaAlbornoz](https://discuss.pennylane.ai/u/CatalinaAlbornoz)\
**Post date:** [February 17, 2022, 4:35pm UTC](https://discuss.pennylane.ai/t/qhack-pennylane-101-finite-difference/1673/2 "2022-02-17T16:35:57Z")

</div>

Hi @qreg, it’s great that you’re trying the challenges! For questions about the challenges you should use the “request clarification” option on your team home page.

If your question is about PennyLane in general, then this is the place to go.

Something that may help is that the error “the array is 0-dimensional” usually means that your array is in fact a scalar so that may be why you’re running into trouble.

I hope this helps!

---

<div class="post-metadata">

**Author:** ![qreg](https://avatars.discourse-cdn.com/v4/letter/q/bbe5ce/32.png) [@qreg](https://discuss.pennylane.ai/u/qreg)\
**Post date:** [February 18, 2022, 3:57am UTC](https://discuss.pennylane.ai/t/qhack-pennylane-101-finite-difference/1673/3 "2022-02-18T03:57:37Z")

</div>

Got it. Thank you very much for your reply.
