Super learner
This user is a Super Learner. To become a Super Learner, you need to reach Level 8.
Last answered:

07 Jan 2024

Posted on:

06 Jan 2024

0

Resolved: No error with not specifying the start argument

Hi,

I tried to specify only the stop arg and was expecting an error as the vedio with this line of code:

arange_a = np.arange(stop=30)

but it worked similar to range function! So, I guess it's a new update to the library!?

Update:

I tried the same with the start argument but raised an error with it instead with stop:

 

1 answers ( 1 marked as helpful)
Posted on:

07 Jan 2024

0

I believe this is because the version of python/numpy that is used in the video is outdated. If you notice, in the video there are only four arguments: start, stop, step, and dtype.


In the latest version of python/numpy there are actually five arguments for the arange function: start, stop, step, dtype, and _like.


I think that along with an update to either python or numpy, the requirements for this function have changed, making the video outdated. It has swapped. Now start will return an error, but stop will not.



Submit an answer