# Array function internal error

**URL:** <https://community.deeplearning.ai/t/array-function-internal-error/221384>\
**Category:** NLP with Classification and Vector Spaces\
**Tags:** week-module-1\
**Created:** [October 23, 2022, 2:59pm UTC](https://community.deeplearning.ai/t/array-function-internal-error/221384 "2022-10-23T14:59:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Soumik\_Nayak](https://avatars.discourse-cdn.com/v4/letter/s/b487fb/32.png) [@Soumik\_Nayak](https://community.deeplearning.ai/u/Soumik_Nayak)\
**Post date:** [October 23, 2022, 2:59pm UTC](https://community.deeplearning.ai/t/array-function-internal-error/221384/1 "2022-10-23T14:59:42Z")

</div>

![Screenshot (3)](https://global.discourse-cdn.com/dlai/original/3X/6/4/640c1b1d37fce6d97b775c2c11d9c7abf34c7a87.png)  
I dont know why i am getting this error of the np.dot function . Anyone please help to fix it. I tried for more than 2 hrs

---

<div class="post-metadata">

**Author:** ![Vu\_Hoang\_Ngo](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/vu_hoang_ngo/32/31526_2.png) [@Vu\_Hoang\_Ngo](https://community.deeplearning.ai/u/Vu_Hoang_Ngo)\
**Post date:** [October 23, 2022, 3:45pm UTC](https://community.deeplearning.ai/t/array-function-internal-error/221384/2 "2022-10-23T15:45:20Z")

</div>

Hi,  
I think you should check again the function gradientDescent. It should be the np.dot between x and theta, and then just follow the Instructions: Implement gradient descent function to write your code

---

<div class="post-metadata">

**Author:** ![davidguo94](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@davidguo94](https://community.deeplearning.ai/u/davidguo94)\
**Post date:** [October 23, 2022, 6:36pm UTC](https://community.deeplearning.ai/t/array-function-internal-error/221384/3 "2022-10-23T18:36:54Z")

</div>

In addition, there are dot products of the cost functions and weights. Maybe you have an error with transposing the matrices?

---

<div class="post-metadata">

**Author:** ![Soumik\_Nayak](https://avatars.discourse-cdn.com/v4/letter/s/b487fb/32.png) [@Soumik\_Nayak](https://community.deeplearning.ai/u/Soumik_Nayak)\
**Post date:** [October 24, 2022, 4:49am UTC](https://community.deeplearning.ai/t/array-function-internal-error/221384/4 "2022-10-24T04:49:11Z")

</div>

![Screenshot (4)](https://global.discourse-cdn.com/dlai/original/3X/b/1/b1dc0828be2527f4f0a06673c8c3b7de82d02c26.png)  
i have again changed the code but same problem persists.  
Actually all the previous tests are passed and it is giving correct results there , but here it is not working  
Moreover the exact same code gave all correct result 2 days ago, but now this error

---

<div class="post-metadata">

**Author:** ![Vu\_Hoang\_Ngo](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/vu_hoang_ngo/32/31526_2.png) [@Vu\_Hoang\_Ngo](https://community.deeplearning.ai/u/Vu_Hoang_Ngo)\
**Post date:** [October 24, 2022, 5:21pm UTC](https://community.deeplearning.ai/t/array-function-internal-error/221384/5 "2022-10-24T17:21:42Z")

</div>

You should check again transpose() function.
