Re: [Numpy-discussion] Unreliable crash when converting using numpy.asarray via C buffer interface

2021-02-04 Thread Friedrich Romstedt
Hello Matti,

Am Mo., 1. Feb. 2021 um 09:46 Uhr schrieb Matti Picus :
>
> [...]
>
> It is very hard to help you from this description. It may be a refcount
> problem, it may be a buffer protocol problem, it may be something else.

Yes, indeed!

> Typically, one would create a complete example and then pointing to the
> code (as repo or pastebin, not as an attachment to a mail here).

https://github.com/friedrichromstedt/bughunting-01

I boiled it down considerably, compared to the program where I
stumbled upon the problem.  In the abovementioned repo, you find a
Python test script in the `test/` folder.  Therein, a single `print`
statement can be used to trigger or to avoid the error.  On Linux, I
get a somewhat more precise description than just from the premature
exit on Windows: It is a segfault.

Certainly it is still asked quite much to skim through my source code,
however, I hope that I trimmed it down sufficiently.

> - Make sure you give instructions how to build your project for Linux,
> since most of the people on this list do not use windows.

The code reproducing the segfault can be compiled by `$ python3
setup.py install`, both on Windows as well as on Linux.

> - There are tools out there to analyze refcount problems. Python has
> some built-in tools for switching allocation strategies.

Can you give me some pointer about this?

> - numpy.asarray has a number of strategies to convert instances, which
> one is it using?

I've tried to read about this, but coudn't find anything.  What are
these different strategies?

Many thanks in advance,
Friedrich
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Math Inspector Beta

2021-02-04 Thread Ralf Gommers
Hi Matt,

Very cool, thanks for sharing!


On Thu, Feb 4, 2021 at 12:19 AM Matt Calhoun  wrote:

> Hi Everyone!  I have been using numpy for an extremely long time, but this
> is the first time emailing the list.  I recently released the beta version
> of my free open source math app called math inspector, and so far the
> response has been really amazing, it was on the front page of hacker news
> all day sunday and went from 15 stars to 348 on GitHub since then.  I
> wanted to reach out to the community to find out if people like this
> project, have any feedback/suggestions/feature requests, or would possibly
> be interested in placing a link to the website (mathinspector.com) on the
> numpy homepage.
>

We have an Ecosystem section on numpy.org, we can add it there. There's an
Interactive Computing section where it kind of fits (although a place
labeled education would be better). There's some discussion on the numpy.org
issue tracker (
https://github.com/numpy/numpy.org/issues/313#issuecomment-751466980) about
moving that to its own tab instead of having it as an entry under
"Scientific computing", but for now we could add it there under
Jupyter/IPython/Binder.


> Math inspector is a python interpreter which contains a frozen version of
> python and numpy, this makes it very easy for non-technical people to get
> started, it also creates a block coding environment which represents the
> memory of the running program.  This block coding environment is at such a
> high level of generality that it's capable of working for all of python.
> It also has an interactive graphing system made in pygame which updates and
> modernizes all of the functionality in matplotlib.  This graphing system is
> it's own stand alone module by the way.  Math inspector also has a
> documentation browser which creates a beautiful interactive experience for
> exploring the documentation.
>
> Everything in math inspector has been designed specifically for
> numpy, even though it works for all of python.  I started it 2 years ago
> when I got really confused after searching through the numpy website, and I
> wanted to build a system where I could dig into the modules in a directory
> file type structure that was highly organized.  From there everything just
> took off.
>

One thing I realized when browsing through the video on your front page is
that the public module layout we have is very unhelpful for this kind of
education - it'd be good if we had a way to hide things like core, emath,
matrixlib, etc. that we don't want people to import and use directly.
Essentially we'd to teach people mostly about the main namespace, and fft,
linalg, and random.

If you have other thoughts on what would help you to make NumPy more
approachable, in Math Inspector or in general, those would be great to hear.

Cheers,
Ralf



> The main goal of this project is to support the mathematics education
> community on youtube, by providing a free tool that everyone can use to
> share code samples for their videos, but I believe it has a wide range of
> additional applications for scientific computing as well.
>
> I have been working really hard on this project, and I really hope
> everyone likes it!
>
> You can find the full source code on the GitHub page:
> https://github.com/MathInspector/MathInspector
>
> Cheers!
> - Matt
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Math Inspector Beta

2021-02-04 Thread Melissa Mendonça
Hi Matt!

This is great timing - we actually talked about mathinspector in our
Documentation Team meeting on monday (you can see the meeting notes here:
https://hackmd.io/oB_boakvRqKR-_2jRV-Qjg

If you are interested, you are welcome to join our slack space and/or our
docs meetings, we would love to chat in more detail.

Cheers,

Melissa

On Thu, Feb 4, 2021 at 6:38 AM Ralf Gommers  wrote:

> Hi Matt,
>
> Very cool, thanks for sharing!
>
>
> On Thu, Feb 4, 2021 at 12:19 AM Matt Calhoun  wrote:
>
>> Hi Everyone!  I have been using numpy for an extremely long time, but
>> this is the first time emailing the list.  I recently released the beta
>> version of my free open source math app called math inspector, and so far
>> the response has been really amazing, it was on the front page of hacker
>> news all day sunday and went from 15 stars to 348 on GitHub since then.  I
>> wanted to reach out to the community to find out if people like this
>> project, have any feedback/suggestions/feature requests, or would possibly
>> be interested in placing a link to the website (mathinspector.com) on
>> the numpy homepage.
>>
>
> We have an Ecosystem section on numpy.org, we can add it there. There's
> an Interactive Computing section where it kind of fits (although a place
> labeled education would be better). There's some discussion on the
> numpy.org issue tracker (
> https://github.com/numpy/numpy.org/issues/313#issuecomment-751466980)
> about moving that to its own tab instead of having it as an entry under
> "Scientific computing", but for now we could add it there under
> Jupyter/IPython/Binder.
>
>
>> Math inspector is a python interpreter which contains a frozen version of
>> python and numpy, this makes it very easy for non-technical people to get
>> started, it also creates a block coding environment which represents the
>> memory of the running program.  This block coding environment is at such a
>> high level of generality that it's capable of working for all of python.
>> It also has an interactive graphing system made in pygame which updates and
>> modernizes all of the functionality in matplotlib.  This graphing system is
>> it's own stand alone module by the way.  Math inspector also has a
>> documentation browser which creates a beautiful interactive experience for
>> exploring the documentation.
>>
>> Everything in math inspector has been designed specifically for
>> numpy, even though it works for all of python.  I started it 2 years ago
>> when I got really confused after searching through the numpy website, and I
>> wanted to build a system where I could dig into the modules in a directory
>> file type structure that was highly organized.  From there everything just
>> took off.
>>
>
> One thing I realized when browsing through the video on your front page is
> that the public module layout we have is very unhelpful for this kind of
> education - it'd be good if we had a way to hide things like core, emath,
> matrixlib, etc. that we don't want people to import and use directly.
> Essentially we'd to teach people mostly about the main namespace, and fft,
> linalg, and random.
>
> If you have other thoughts on what would help you to make NumPy more
> approachable, in Math Inspector or in general, those would be great to hear.
>
> Cheers,
> Ralf
>
>
>
>> The main goal of this project is to support the mathematics education
>> community on youtube, by providing a free tool that everyone can use to
>> share code samples for their videos, but I believe it has a wide range of
>> additional applications for scientific computing as well.
>>
>> I have been working really hard on this project, and I really hope
>> everyone likes it!
>>
>> You can find the full source code on the GitHub page:
>> https://github.com/MathInspector/MathInspector
>>
>> Cheers!
>> - Matt
>> ___
>> NumPy-Discussion mailing list
>> NumPy-Discussion@python.org
>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Math Inspector Beta

2021-02-04 Thread Matt Calhoun
@ Mansour Moufid
> Very cool!
> But the Mac disk image (mathinspector_0.9.1.dmg) isn't opening ("corrupt
image").
> It's 145279488 bytes and the shasum ends with f1ed9231.

Oh no, whoops!  The .dmg file has been code signed with my apple developer
id, notarized with apple, and passes all verification checks on my machine
when I download it from the website.  Ever since sunday I have been
scrambling to support every platform and os version out there basically,
and this is the first time I saw this one.  For the sake of avoiding using
the mailing list to debug, would be willing to open an issue on the Math
Inspector github page?  Thanks!  (btw I checked the file on my machine and
its the same filesize with the same shasum, so my guess is there is a
pyinstaller issue related to an os version conflict, or a code signing
issue, not sure though, I built it on BigSur 11.1)

@ Ralf Gommers
> Very cool, thanks for sharing!
Thank you!!!

> We have an Ecosystem section on numpy.org, we can add it there

It's really important to me to make math inspector a part of the numpy
ecosystem, and since this is the first time I am reaching out to the
mailing list, I'd like emphasize that I am more than willing to work with
the community to improve the product, respond to bug reports & feature
requests, and in general I strongly value constructive criticism.

> One thing I realized when browsing through the video on your front page is
> that the public module layout we have is very unhelpful for this kind of
> education...If you have other thoughts on what would help you to make
NumPy more
> approachable, in Math Inspector or in general, those would be great to
hear.

I completely agree with your observation here.  It hadn't occurred to me to
change numpy to make it better for math inspector, but I think you are
hitting the nail on the head when you suggest re-organizing the file
structure of the core package.

The main suggestion I have is to update the documentation in a way that
leverages the power of math inspector.  The math inspector doc browser is a
powerful tool with lots of extra functionality that is not available from
the website or in the normal python help() function.  This extra
functionality could be used to make numpy more approachable.  For example,
replace references to matplotlib in the doc's with mathinspector.plot(),
and substitute mathinspector for iPython as the recommended tool.

Thanks for this fantastic feedback!
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Math Inspector Beta

2021-02-04 Thread Charles R Harris
On Wed, Feb 3, 2021 at 4:19 PM Matt Calhoun  wrote:

> Hi Everyone!  I have been using numpy for an extremely long time, but this
> is the first time emailing the list.  I recently released the beta version
> of my free open source math app called math inspector, and so far the
> response has been really amazing, it was on the front page of hacker news
> all day sunday and went from 15 stars to 348 on GitHub since then.  I
> wanted to reach out to the community to find out if people like this
> project, have any feedback/suggestions/feature requests, or would possibly
> be interested in placing a link to the website (mathinspector.com) on the
> numpy homepage.
>
> Math inspector is a python interpreter which contains a frozen version of
> python and numpy, this makes it very easy for non-technical people to get
> started, it also creates a block coding environment which represents the
> memory of the running program.  This block coding environment is at such a
> high level of generality that it's capable of working for all of python.
> It also has an interactive graphing system made in pygame which updates and
> modernizes all of the functionality in matplotlib.  This graphing system is
> it's own stand alone module by the way.  Math inspector also has a
> documentation browser which creates a beautiful interactive experience for
> exploring the documentation.
>
> Everything in math inspector has been designed specifically for
> numpy, even though it works for all of python.  I started it 2 years ago
> when I got really confused after searching through the numpy website, and I
> wanted to build a system where I could dig into the modules in a directory
> file type structure that was highly organized.  From there everything just
> took off.
>
> The main goal of this project is to support the mathematics education
> community on youtube, by providing a free tool that everyone can use to
> share code samples for their videos, but I believe it has a wide range of
> additional applications for scientific computing as well.
>
> I have been working really hard on this project, and I really hope
> everyone likes it!
>
> You can find the full source code on the GitHub page:
> https://github.com/MathInspector/MathInspector
>
> Cheers!
> - Matt
>

Somewhat off topic, but this brought to mind Model Based Design
. MBD is a
different subject, but I suspect the same underlying tools used for
MathInspector might be useful.

Chuck
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion