[Numpy-discussion] Re: Numpy array

2022-01-27 Thread bigfixforum
Thanks Robert. I though about the same that boolean must be dropping the 
elements but i wasn't sure about it. Thanks for the confirmation. Appreciate 
your help.
___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com


[Numpy-discussion] Re: Numpy array

2022-01-27 Thread Robert Kern
On Thu, Jan 27, 2022 at 8:18 AM  wrote:

> Hi, i am new to numpy. This is first time i am using numpy.
>
> https://github.com/mspieg/dynamical-systems/blob/master/Bifurcations.ipynb
>
> This code i found to create bifurcation graph. There is section of code
> which i am not able to understand
>
> vr[stable], vx[stable]
>
> vr and vx is array of 150 elements.
> unstable and stable array also has 150 elements
>
> But vr[stable], vx[stable] becomes 75 elements in the array. Which i am
> not able to umderstand how 150 elements in array drops to 75
>

`stable` is a boolean array which is True where `f_x(vr, vx) < 0` and False
otherwise. When a boolean array is used as an index, the resulting array
only has the elements where the boolean value in the index array is True
and dropping all of the elements where it is False. That is why the number
of elements changes.

https://numpy.org/doc/stable/user/basics.indexing.html#boolean-array-indexing

-- 
Robert Kern
___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com


[Numpy-discussion] Re: Numpy array

2022-01-27 Thread Lev Maximov
Yes, this page has a ton of interesting stuff, too! I gave just one link
because it might take time to
choose between 10 excellent tutorials. It's just my personal preference :)

Btw, is it possible to automate the detection of dead links on that page?

Lev

On Thu, Jan 27, 2022 at 11:25 PM Rohit Goswami 
wrote:

> Agreed, however, the NumPy learn section of the official documentation
>  is probably a better place to point to (though
> your article is justifiably also linked from there).
> --
>
> Rohit
>
> On 27 Jan 2022, at 16:15, Lev Maximov wrote:
>
> Hi,
>
> I believe this question fits Stack Overflow better.
>
> Here're SO guidelines on how to create a minimal reproducible example:
> https://stackoverflow.com/help/minimal-reproducible-example
>
> If you're new to NumPy I'd recommend this visual guide:
>
> https://betterprogramming.pub/numpy-illustrated-the-visual-guide-to-numpy-3b1d4976de1d
>
> Best regards,
> Lev
>
> On Thu, Jan 27, 2022 at 8:19 PM  wrote:
>
>> Hi, i am new to numpy. This is first time i am using numpy.
>>
>> https://github.com/mspieg/dynamical-systems/blob/master/Bifurcations.ipynb
>>
>> This code i found to create bifurcation graph. There is section of code
>> which i am not able to understand
>>
>> vr[stable], vx[stable]
>>
>> vr and vx is array of 150 elements.
>> unstable and stable array also has 150 elements
>>
>> But vr[stable], vx[stable] becomes 75 elements in the array. Which i am
>> not able to umderstand how 150 elements in array drops to 75
>> ___
>> NumPy-Discussion mailing list -- numpy-discussion@python.org
>> To unsubscribe send an email to numpy-discussion-le...@python.org
>> https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
>> Member address: lev.maxi...@gmail.com
>>
> ___
> NumPy-Discussion mailing list -- numpy-discussion@python.org
> To unsubscribe send an email to numpy-discussion-le...@python.org
> https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
>
> Member address: rgosw...@quansight.com
>
> ___
> NumPy-Discussion mailing list -- numpy-discussion@python.org
> To unsubscribe send an email to numpy-discussion-le...@python.org
> https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
> Member address: lev.maxi...@gmail.com
>
___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com


[Numpy-discussion] Re: Numpy array

2022-01-27 Thread Rohit Goswami
Agreed, however, the[ NumPy learn section of the official 
documentation](https://numpy.org/learn/) is probably a better place to 
point to (though your article is justifiably also linked from there).


---
Rohit

On 27 Jan 2022, at 16:15, Lev Maximov wrote:


Hi,

I believe this question fits Stack Overflow better.

Here're SO guidelines on how to create a minimal reproducible example:
https://stackoverflow.com/help/minimal-reproducible-example

If you're new to NumPy I'd recommend this visual guide:
https://betterprogramming.pub/numpy-illustrated-the-visual-guide-to-numpy-3b1d4976de1d

Best regards,
Lev

On Thu, Jan 27, 2022 at 8:19 PM  wrote:


Hi, i am new to numpy. This is first time i am using numpy.

https://github.com/mspieg/dynamical-systems/blob/master/Bifurcations.ipynb

This code i found to create bifurcation graph. There is section of 
code

which i am not able to understand

vr[stable], vx[stable]

vr and vx is array of 150 elements.
unstable and stable array also has 150 elements

But vr[stable], vx[stable] becomes 75 elements in the array. Which i 
am

not able to umderstand how 150 elements in array drops to 75
___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: lev.maxi...@gmail.com




___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: rgosw...@quansight.com___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com


[Numpy-discussion] Re: Numpy array

2022-01-27 Thread Lev Maximov
Hi,

I believe this question fits Stack Overflow better.

Here're SO guidelines on how to create a minimal reproducible example:
https://stackoverflow.com/help/minimal-reproducible-example

If you're new to NumPy I'd recommend this visual guide:
https://betterprogramming.pub/numpy-illustrated-the-visual-guide-to-numpy-3b1d4976de1d

Best regards,
Lev

On Thu, Jan 27, 2022 at 8:19 PM  wrote:

> Hi, i am new to numpy. This is first time i am using numpy.
>
> https://github.com/mspieg/dynamical-systems/blob/master/Bifurcations.ipynb
>
> This code i found to create bifurcation graph. There is section of code
> which i am not able to understand
>
> vr[stable], vx[stable]
>
> vr and vx is array of 150 elements.
> unstable and stable array also has 150 elements
>
> But vr[stable], vx[stable] becomes 75 elements in the array. Which i am
> not able to umderstand how 150 elements in array drops to 75
> ___
> NumPy-Discussion mailing list -- numpy-discussion@python.org
> To unsubscribe send an email to numpy-discussion-le...@python.org
> https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
> Member address: lev.maxi...@gmail.com
>
___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com