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

2021-03-29 Thread Friedrich Romstedt
Hi Matti, Sebastian and Lev,

Am Mo., 15. Feb. 2021 um 18:50 Uhr schrieb Lev Maximov :
>
> Try adding
> view->suboffsets = NULL;
> view->internal = NULL;
> to Image_getbuffer

finally I got it working easily using Lev's pointer cited above.  I
didn't follow the valgrind approach furthermore, since I found it
likely that it'd produce the same finding.

This is just to let you know; I applied the fix several weeks ago.

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


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

2021-03-29 Thread Lev Maximov
I'm glad you sorted it out as the subject line sounded quite horrifying )

Best regards,
Lev

On Mon, Mar 29, 2021 at 2:54 PM Friedrich Romstedt <
friedrichromst...@gmail.com> wrote:

> Hi Matti, Sebastian and Lev,
>
> Am Mo., 15. Feb. 2021 um 18:50 Uhr schrieb Lev Maximov <
> lev.maxi...@gmail.com>:
> >
> > Try adding
> > view->suboffsets = NULL;
> > view->internal = NULL;
> > to Image_getbuffer
>
> finally I got it working easily using Lev's pointer cited above.  I
> didn't follow the valgrind approach furthermore, since I found it
> likely that it'd produce the same finding.
>
> This is just to let you know; I applied the fix several weeks ago.
>
> Many thanks,
> Friedrich
> ___
> 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] Unreliable crash when converting using numpy.asarray via C buffer interface

2021-03-29 Thread Gunter Meissner
Aloha Numpy Community,
I am just writing a book on "How to Cheat in Statistics - And get Away with
It".
I noticed there is no built-in syntax for the 'Adjusted R-squared' in any
library (do correct me if I am wrong)
I think it would be a good idea to program it. The math is straight
forward, I can
provide it if desired.
Thank you,
Gunter


On Mon, Feb 15, 2021 at 5:56 AM Sebastian Berg 
wrote:

> On Mon, 2021-02-15 at 10:12 +0100, Friedrich Romstedt wrote:
> > Hi,
> >
> > Am Do., 4. Feb. 2021 um 09:07 Uhr schrieb Friedrich Romstedt
> > :
> > > Am Mo., 1. Feb. 2021 um 09:46 Uhr schrieb Matti Picus <
> > > matti.pi...@gmail.com>:
> > > > 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
> >
> > Last week I updated my example code to be more slim.  There now
> > exists
> > a single-file extension module:
> >
> https://github.com/friedrichromstedt/bughunting-01/blob/master/lib/bugIhuntingfrmod/bughuntingfrmod.cpp
> 
> > .
> > The corresponding test program
> >
> https://github.com/friedrichromstedt/bughunting-01/blob/master/test/2021-02-11_0909.py
> > crashes "properly" both on Windows 10 (Python 3.8.2, numpy 1.19.2) as
> > well as on Arch Linux (Python 3.9.1, numpy 1.20.0), when the
> > ``print``
> > statement contained in the test file is commented out.
> >
> > My hope to be able to fix my error myself by reducing the code to
> > reproduce the problem has not been fulfillled.  I feel that the
> > abovementioned test code is short enough to ask for help with it
> > here.
> > Any hint on how I could solve my problem would be appreciated very
> > much.
>
> I have tried it out, and can confirm that using debugging tools (namely
> valgrind), will allow you track down the issue (valgrind reports it
> from within python, running a python without debug symbols may
> obfuscate the actual problem; if that is the limiting you, I can post
> my valgrind output).
> Since you are running a linux system, I am confident that you can run
> it in valgrind to find it yourself.  (There may be other ways.)
>
> Just remember to run valgrind with `PYTHONMALLOC=malloc valgrind` and
> ignore some errors e.g. when importing NumPy.
>
> Cheers,
>
> Sebastian
>
>
> >
> > There are some points which were not clarified yet; I am citing them
> > below.
> >
> > So far,
> > Friedrich
> >
> > > > - 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 couldn't find anything.  What
> > > are
> > > these different strategies?
> > ___
> > 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
>


-- 

Gunter Meissner, PhD

University of Hawaii

Adjunct Professor of MathFinance at Columbia University and NYU

President of Derivatives Software www.dersoft.com

CEO Cassandra Capital Management www.cassandracm.com

CV: www.dersoft.com/cv.pdf

Email: meiss...@hawaii.edu

Tel: USA (808) 779 3660
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] Expanding the scope of numpy.unpackbits and numpy.packbits to include more than uint8 type

2021-03-29 Thread Rashiq Azhan
I would like this feature to be added since I think it can very useful
when there is a need to process data that cannot be included in uint8.
One of my personal requirements is modifying a 10-bit, per channel,
images held in a NumPy array but I cannot do that using the specified
functions. They are eloquent solution and works well with the with
NumPy functions as long as the data is uint8.
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Expanding the scope of numpy.unpackbits and numpy.packbits to include more than uint8 type

2021-03-29 Thread Joseph Fox-Rabinovitz
You can view any array as uint8


On Mon, Mar 29, 2021, 14:27 Rashiq Azhan  wrote:

> I would like this feature to be added since I think it can very useful
> when there is a need to process data that cannot be included in uint8.
> One of my personal requirements is modifying a 10-bit, per channel,
> images held in a NumPy array but I cannot do that using the specified
> functions. They are eloquent solution and works well with the with
> NumPy functions as long as the data is uint8.
> ___
> 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] ANN: SfePy 2021.1

2021-03-29 Thread Robert Cimrman

I am pleased to announce the release of SfePy 2021.1.

Description
---

SfePy (simple finite elements in Python) is a software for solving systems of
coupled partial differential equations by finite element methods. It is
distributed under the new BSD license.

Home page: https://sfepy.org
Mailing list: https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
Git (source) repository, issue tracker: https://github.com/sfepy/sfepy

Highlights of this release
--

- non-square homogenized coefficient matrices
- new implementation of multi-linear terms
- improved handling of Dirichlet and periodic boundary conditions in common
  nodes
- terms in the term table document linked to examples

For full release notes see [1].

Cheers,
Robert Cimrman

[1] http://docs.sfepy.org/doc/release_notes.html#id1

---

Contributors to this release in alphabetical order:

Robert Cimrman
Antony Kamp
Vladimir Lukes

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