<div dir="ltr"><div dir="ltr">Aloha Numpy Community,<div>I am just writing a book on "How to Cheat in Statistics - And get Away with It". </div><div>I noticed there is no built-in syntax for the 'Adjusted R-squared' in any library (do correct me if I am wrong)</div><div>I think it would be a good idea to program it. The math is straight forward, I can </div><div>provide it if desired. </div><div>Thank you,</div><div>Gunter  </div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 15, 2021 at 5:56 AM Sebastian Berg <<a href="mailto:sebastian@sipsolutions.net">sebastian@sipsolutions.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, 2021-02-15 at 10:12 +0100, Friedrich Romstedt wrote:<br>
> Hi,<br>
> <br>
> Am Do., 4. Feb. 2021 um 09:07 Uhr schrieb Friedrich Romstedt<br>
> <<a href="mailto:friedrichromstedt@gmail.com" target="_blank">friedrichromstedt@gmail.com</a>>:<br>
> > Am Mo., 1. Feb. 2021 um 09:46 Uhr schrieb Matti Picus <<br>
> > <a href="mailto:matti.picus@gmail.com" target="_blank">matti.picus@gmail.com</a>>:<br>
> > > Typically, one would create a complete example and then pointing<br>
> > > to the<br>
> > > code (as repo or pastebin, not as an attachment to a mail here).<br>
> > <br>
> > <a href="https://github.com/friedrichromstedt/bughunting-01" rel="noreferrer" target="_blank">https://github.com/friedrichromstedt/bughunting-01</a><br>
> <br>
> Last week I updated my example code to be more slim.  There now<br>
> exists<br>
> a single-file extension module:<br>
> <a href="https://github.com/friedrichromstedt/bughunting-01/blob/master/lib/bughuntingfrmod/bughuntingfrmod.cpp" rel="noreferrer" target="_blank">https://github.com/friedrichromstedt/bughunting-01/blob/master/lib/bugIhuntingfrmod/bughuntingfrmod.cpp</a><br>
> .<br>
> The corresponding test program<br>
> <a href="https://github.com/friedrichromstedt/bughunting-01/blob/master/test/2021-02-11_0909.py" rel="noreferrer" target="_blank">https://github.com/friedrichromstedt/bughunting-01/blob/master/test/2021-02-11_0909.py</a><br>
> crashes "properly" both on Windows 10 (Python 3.8.2, numpy 1.19.2) as<br>
> well as on Arch Linux (Python 3.9.1, numpy 1.20.0), when the<br>
> ``print``<br>
> statement contained in the test file is commented out.<br>
> <br>
> My hope to be able to fix my error myself by reducing the code to<br>
> reproduce the problem has not been fulfillled.  I feel that the<br>
> abovementioned test code is short enough to ask for help with it<br>
> here.<br>
> Any hint on how I could solve my problem would be appreciated very<br>
> much.<br>
<br>
I have tried it out, and can confirm that using debugging tools (namely<br>
valgrind), will allow you track down the issue (valgrind reports it<br>
from within python, running a python without debug symbols may<br>
obfuscate the actual problem; if that is the limiting you, I can post<br>
my valgrind output).<br>
Since you are running a linux system, I am confident that you can run<br>
it in valgrind to find it yourself.  (There may be other ways.)<br>
<br>
Just remember to run valgrind with `PYTHONMALLOC=malloc valgrind` and<br>
ignore some errors e.g. when importing NumPy.<br>
<br>
Cheers,<br>
<br>
Sebastian<br>
<br>
<br>
> <br>
> There are some points which were not clarified yet; I am citing them<br>
> below.<br>
> <br>
> So far,<br>
> Friedrich<br>
> <br>
> > > - There are tools out there to analyze refcount problems. Python<br>
> > > has<br>
> > > some built-in tools for switching allocation strategies.<br>
> > <br>
> > Can you give me some pointer about this?<br>
> > <br>
> > > - numpy.asarray has a number of strategies to convert instances,<br>
> > > which<br>
> > > one is it using?<br>
> > <br>
> > I've tried to read about this, but couldn't find anything.  What<br>
> > are<br>
> > these different strategies?<br>
> _______________________________________________<br>
> NumPy-Discussion mailing list<br>
> <a href="mailto:NumPy-Discussion@python.org" target="_blank">NumPy-Discussion@python.org</a><br>
> <a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/numpy-discussion</a><br>
> <br>
<br>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@python.org" target="_blank">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/numpy-discussion</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><p class="MsoNormal"><span style="color:rgb(23,54,93)">Gunter
Meissner, PhD</span></p>

<p class="MsoNormal"><span style="color:rgb(23,54,93)">University
of Hawaii</span></p>

<p class="MsoNormal"><span style="color:rgb(23,54,93)">Adjunct
Professor of MathFinance at Columbia University and NYU</span></p>

<p class="MsoNormal"><span style="color:rgb(23,54,93)">President
of Derivatives Software </span><a href="http://www.dersoft.com/" target="_blank"><span style="color:blue">www.dersoft.com</span></a><span style="color:rgb(31,73,125)"> </span><span style="color:rgb(23,54,93)"> </span></p>

<p class="MsoNormal"><span style="color:rgb(23,54,93)">CEO
Cassandra Capital Management </span><a href="http://www.cassandracm.com/" target="_blank"><span style="color:blue">www.cassandracm.com</span></a><span style="color:rgb(23,54,93)"> </span></p>

<p class="MsoNormal"><span style="color:rgb(23,54,93)">CV: </span><a href="http://www.dersoft.com/cv.pdf" target="_blank"><span style="color:blue">www.dersoft.com/cv.pdf</span></a><span style="color:rgb(23,54,93)">
</span></p>

<p class="MsoNormal"><span style="color:rgb(23,54,93)">Email: </span><a href="mailto:meissner@hawaii.edu" target="_blank"><span style="color:rgb(23,54,93)">meissner@hawaii.edu</span></a><span style="color:rgb(23,54,93)"></span></p>

<p class="MsoNormal"><span style="color:rgb(23,54,93)">Tel: USA
(808) 779 3660</span></p><p class="MsoNormal"><br></p></div></div></div>