toad.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server operated by David Troy, a tech pioneer and investigative journalist addressing threats to democracy. Thoughtful participation and discussion welcome.

Administered by:

Server stats:

227
active users

#numpy

2 posts2 participants1 post today
mgorny-nyan (he) :autism:🙀🚂🐧<p>What I've planned to be doing: adding CPU_FLAGS_* support to <a href="https://social.treehouse.systems/tags/NumPy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NumPy</span></a> package in <a href="https://social.treehouse.systems/tags/Gentoo" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Gentoo</span></a>.</p><p>What I am doing instead: digging through <a href="https://social.treehouse.systems/tags/ARM" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ARM</span></a> documentation, kernel sources, NumPy sources to figure out what's missing from CPU_FLAGS_ARM and how to detect it.</p>
Queen Calyo Delphi<p>Ugh great.</p><p>I sing mild praises of <a href="https://rubber.social/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> documentation, but when it comes to third party libraries like <a href="https://rubber.social/tags/NumPy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NumPy</span></a> and especially <a href="https://rubber.social/tags/SciPy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SciPy</span></a> the documentation ranges from less than stellar to utterly atrocious.</p><p>And now I have a problem: scipy.optimize.fsolve() is throwing a numpy DeprecationWarning: Conversion of an array with nim &gt; 0 to a scalar is deprecated.</p><p>The function I'm passing in to fsolve() returns a scalar!! And I'm already extracting index 0 from the return of fsolve!! WTF???</p>
Blosc Development Team<p>🗣️ Announcing Python-Blosc2 3.6.1</p><p>!Unlock new levels of data manipulation with Blosc2! 🚀</p><p>We've introduced a major improvement: powerful fancy indexing and orthogonal indexing for Blosc2 arrays.</p><p>We've tamed the complexity of fancy indexing to make it intuitive, efficient, and consistent with NumPy's behavior. 💪 </p><p>Read all about it on our blog! 📝 <a href="https://www.blosc.org/posts/blosc2-fancy-indexing/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">blosc.org/posts/blosc2-fancy-i</span><span class="invisible">ndexing/</span></a></p><p>Compress Better, Compute Bigger!</p><p><a href="https://fosstodon.org/tags/Blosc2" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Blosc2</span></a> <a href="https://fosstodon.org/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://fosstodon.org/tags/DataScience" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>DataScience</span></a> <a href="https://fosstodon.org/tags/BigData" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>BigData</span></a> <a href="https://fosstodon.org/tags/NumPy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NumPy</span></a> <a href="https://fosstodon.org/tags/Performance" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Performance</span></a> <a href="https://fosstodon.org/tags/HPC" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>HPC</span></a></p>
Simone Conradi<p>I move 1 along the x-axis, then rotate by an angle theta, I move 1/phi, rotate by theta, I move 1/phi², rotate by theta etc etc.<br>Made with <a href="https://mathstodon.xyz/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://mathstodon.xyz/tags/numpy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>numpy</span></a> <a href="https://mathstodon.xyz/tags/matplotlib" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>matplotlib</span></a></p>
Pekka Väänänen<p>New article on my site: HyAB k-means for color quantization</p><p>In which I try to improve color clustering with a different distance function. It's a simple technique in the end but it's pretty hard to evaluate if it's an improvement or not!</p><p><a href="https://30fps.net/pages/hyab-kmeans/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">30fps.net/pages/hyab-kmeans/</span><span class="invisible"></span></a><br><a href="https://github.com/pekkavaa/HyAB-kmeans/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/pekkavaa/HyAB-kmean</span><span class="invisible">s/</span></a> with <a href="https://mastodon.gamedev.place/tags/numpy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>numpy</span></a> code</p>
John-Mark Gurney<p>And btw, can I get units for variables already? Annoyed that I can't say that this variable is in inches, or in bytes. Want to be able to tag data that says this is xyY, or XYZ space so that my function can convert if necessary or not.</p><p><a href="https://flyovercountry.social/tags/numpy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>numpy</span></a> <a href="https://flyovercountry.social/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a></p>
OpenMP ARB<p>🚀 Great news for OpenMP on Python! </p><p>NumPy 2.3 includes early OpenMP support, making sorting operations like np.sort and np.argsort faster by using multiple processor cores — a big step for performance!</p><p>🛠️ This new feature is off by default but can be turned on during installation with -Denable_openmp=true</p><p>This marks the beginning of more parallel computing support in NumPy! </p><p><a href="https://www.phoronix.com/news/NumPy-2.3-Released" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">phoronix.com/news/NumPy-2.3-Re</span><span class="invisible">leased</span></a></p><p><a href="https://mast.hpc.social/tags/NumPy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NumPy</span></a> <a href="https://mast.hpc.social/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://mast.hpc.social/tags/Performance" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Performance</span></a> <a href="https://mast.hpc.social/tags/OpenMP" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>OpenMP</span></a> <a href="https://mast.hpc.social/tags/HPC" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>HPC</span></a></p>
John-Mark Gurney<p>If you're writing python libraries, DON'T REQUIRE fileno ON FILE OBJECTS!</p><p>Dealing w/ the bullshit that numpy.fromfile wants the fileno attribute on a file object. Yes, it's slightly faster, but it also makes it harder to mock when doing testing.</p><p>Now I'm going to have to deal w/ creating a temporary directory, writing the file, and cleaning up afterward. Things that unittest.TestCase should have an option to do, but doesn't. Luckily I've dealt w/ this BS before, so I'll just copy the code from another project.</p><p><a href="https://flyovercountry.social/tags/numpy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>numpy</span></a> <a href="https://flyovercountry.social/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://flyovercountry.social/tags/Testing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Testing</span></a></p>
John-Mark Gurney<p>Since I couldn't figure out how to use numpy.take, and LLMs couldn't figure out how to do what I needed to do, I read the numpy slicing chapter, and I came up with the following:<br>indexes = np.arange(W * H)<br>rgb[0, i].flat = c[0].flat[np.array(reps[i].flat) * (W * H) + indexes]</p><p>EDIT: it was broken, needed to add in the position index and simplification.</p><p><a href="https://flyovercountry.social/tags/numpy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>numpy</span></a> <a href="https://flyovercountry.social/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a></p>
Alexandre B A Villares<p>Back to the <a href="https://pynews.com.br/tags/numpy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>numpy</span></a> &amp; <a href="https://pynews.com.br/tags/flocking" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>flocking</span></a> experiment based on Nicolas Rougier's example in "From Python to Numpy". Code at: <a href="https://github.com/villares/sketch-a-day/tree/main/2025/sketch_2025_06_26" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/villares/sketch-a-d</span><span class="invisible">ay/tree/main/2025/sketch_2025_06_26</span></a><br>More sketch-a-day: <a href="https://abav.lugaralgum.com/sketch-a-day" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">abav.lugaralgum.com/sketch-a-d</span><span class="invisible">ay</span></a><br>If you like this, support my work: <br><a href="https://www.paypal.com/donate/?hosted_button_id=5B4MZ78C9J724" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">paypal.com/donate/?hosted_butt</span><span class="invisible">on_id=5B4MZ78C9J724</span></a><br><a href="https://liberapay.com/Villares" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">liberapay.com/Villares</span><span class="invisible"></span></a><br><a href="https://wise.com/pay/me/alexandrev562" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">wise.com/pay/me/alexandrev562</span><span class="invisible"></span></a> <a href="https://pynews.com.br/tags/Processing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Processing</span></a> <a href="https://pynews.com.br/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://pynews.com.br/tags/py5" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>py5</span></a> <a href="https://pynews.com.br/tags/CreativeCoding" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CreativeCoding</span></a></p>
Alexandre B A Villares<p>Not very good WIP... I always struggle to make <a href="https://pynews.com.br/tags/trimesh" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>trimesh</span></a> 3D meshes from scratch with <a href="https://pynews.com.br/tags/numpy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>numpy</span></a> Code at: <a href="https://github.com/villares/sketch-a-day/tree/main/2025/sketch_2025_06_22" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/villares/sketch-a-d</span><span class="invisible">ay/tree/main/2025/sketch_2025_06_22</span></a><br>More sketch-a-day: <a href="https://abav.lugaralgum.com/sketch-a-day" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">abav.lugaralgum.com/sketch-a-d</span><span class="invisible">ay</span></a><br>If you like this, support my work: <br><a href="https://www.paypal.com/donate/?hosted_button_id=5B4MZ78C9J724" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">paypal.com/donate/?hosted_butt</span><span class="invisible">on_id=5B4MZ78C9J724</span></a><br><a href="https://liberapay.com/Villares" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">liberapay.com/Villares</span><span class="invisible"></span></a><br><a href="https://wise.com/pay/me/alexandrev562" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">wise.com/pay/me/alexandrev562</span><span class="invisible"></span></a> <a href="https://pynews.com.br/tags/Processing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Processing</span></a> <a href="https://pynews.com.br/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://pynews.com.br/tags/py5" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>py5</span></a> <a href="https://pynews.com.br/tags/CreativeCoding" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CreativeCoding</span></a></p>
Peter Drake<p>In NumPy, if a and b are matrices, a @ b gives you the matrix product.</p><p>If a and b are vectors, a @ b gives you a dot product.</p><p>If a and b are scalars (0-dimensional tensors), a @ b throws an error.</p><p><a href="https://mstdn.social/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://mstdn.social/tags/NumPy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NumPy</span></a></p>
Towards Data Science<p>Explore why <a href="https://hachyderm.io/tags/NumPy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NumPy</span></a>’s crown is suddenly wobbly. </p><p>Thomas Reid’s latest deep-dive benchmarks JAX on auto diff, JIT, vectorization, and GPU acceleration, revealing speedups that cut experiment time and cloud costs... must-read intel for Python power users and ML engineers. </p><p><a href="https://towardsdatascience.com/jax-is-this-googles-numpy-killer/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">towardsdatascience.com/jax-is-</span><span class="invisible">this-googles-numpy-killer/</span></a></p>
Sharlatan<p><a href="https://mastodon.social/tags/Guix" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Guix</span></a> practitioners, I am planning which direction to prioritise in the next Python and Golang team updates, anything on your list to include?</p><p>As I started the MOOC by <a href="https://mastodon.social/tags/Inria" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Inria</span></a> I've noted that Singularity is a nice candidate to bring to the containers collection, from the first glance it doesn't have too many dependencies (compared with Kubo...) <a href="https://github.com/sylabs/singularity/blob/main/go.mod" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/sylabs/singularity/</span><span class="invisible">blob/main/go.mod</span></a></p><p>For Python, stabilise the chain of <a href="https://mastodon.social/tags/NumPy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NumPy</span></a> and try to figure out how to migrate to V2 <a href="https://issues.guix.gnu.org/76240" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">issues.guix.gnu.org/76240</span><span class="invisible"></span></a></p>
Towards Data Science<p>Tired of silent <a href="https://hachyderm.io/tags/NumPy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NumPy</span></a> errors? Christopher Ariza reveals how to fully annotate your np.ndarray with shape &amp; dtype hints. Enable static analysis with MyPy and runtime validation with StaticFrame's CallGuard. Write more robust Python code. Read the full article to learn more. </p><p><a href="https://towardsdatascience.com/do-more-with-numpy-array-type-hints-annotate-validate-shape-dtype/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">towardsdatascience.com/do-more</span><span class="invisible">-with-numpy-array-type-hints-annotate-validate-shape-dtype/</span></a></p>
Clément Robert<p><a href="https://ieji.de/tags/NumPy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NumPy</span></a> just started publishing nightly builds for <a href="https://ieji.de/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> 3.14 (and 3.14t) ! Time for the <a href="https://ieji.de/tags/scientificPython" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>scientificPython</span></a> ecosystem to start testing this year’s edition !</p><p>Set PIP_EXTRA_INDEX (or UV_INDEX) to <a href="https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">pypi.anaconda.org/scientific-p</span><span class="invisible">ython-nightly-wheels/simple/</span></a><br>With <a href="https://ieji.de/tags/astraluv" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>astraluv</span></a>, you might also need UV_INDEX_STRATEGY=unsafe-best-match to easily combine dependencies from multiple indexes.</p>
Michael Szell<p><a href="https://dynomight.net/dumpy/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">dynomight.net/dumpy/</span><span class="invisible"></span></a><br>DumPy: NumPy except it's OK if you're dum</p><p>Interesting. A good part of teaching/learning <a href="https://datasci.social/tags/numpy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>numpy</span></a> is being aware of the many syntax/shape gotchas. This looks like it can get rid of it. :numpy:</p>
Alexandre B A Villares<p>Code at: <a href="https://github.com/villares/sketch-a-day/tree/main/2025/sketch_2025_05_18" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/villares/sketch-a-d</span><span class="invisible">ay/tree/main/2025/sketch_2025_05_18</span></a><br>More sketch-a-day: <a href="https://abav.lugaralgum.com/sketch-a-day" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">abav.lugaralgum.com/sketch-a-d</span><span class="invisible">ay</span></a><br>If you like this, support my work: <br><a href="https://www.paypal.com/donate/?hosted_button_id=5B4MZ78C9J724" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">paypal.com/donate/?hosted_butt</span><span class="invisible">on_id=5B4MZ78C9J724</span></a><br><a href="https://liberapay.com/Villares" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">liberapay.com/Villares</span><span class="invisible"></span></a><br><a href="https://wise.com/pay/me/alexandrev562" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">wise.com/pay/me/alexandrev562</span><span class="invisible"></span></a><br><a href="https://pynews.com.br/tags/PeasyCam" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PeasyCam</span></a> <a href="https://pynews.com.br/tags/numpy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>numpy</span></a> <a href="https://pynews.com.br/tags/Processing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Processing</span></a> <a href="https://pynews.com.br/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://pynews.com.br/tags/py5" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>py5</span></a> <a href="https://pynews.com.br/tags/CreativeCoding" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CreativeCoding</span></a></p>
jbz<p>🐍 I don’t like NumPy</p><p>「 NumPy is all about applying operations to arrays. When the arrays have 2 or fewer dimensions, everything is fine. But if you’re doing something even mildly complicated, you inevitably find yourself with some operation you want to apply to some dimensions of array A, some other dimensions of array B, and some other dimensions of array C. And NumPy has no theory for how to express that 」</p><p><a href="https://dynomight.net/numpy/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">dynomight.net/numpy/</span><span class="invisible"></span></a></p><p><a href="https://indieweb.social/tags/numpy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>numpy</span></a> <a href="https://indieweb.social/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a></p>
Aron Gergely<p>For <a href="https://mastodon.social/tags/PyQGIS" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PyQGIS</span></a> raster masters: </p><p>use QgsRasterLayer.as_numpy() to get your raster layer as numpy array.</p><p>This was silently added in QGIS v3.40, <br>thus no one seems to know! </p><p>see <a href="https://qgis.org/pyqgis/3.40/core/QgsRasterLayer.html#qgis.core.QgsRasterLayer.as_numpy" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">qgis.org/pyqgis/3.40/core/QgsR</span><span class="invisible">asterLayer.html#qgis.core.QgsRasterLayer.as_numpy</span></a></p><p><a href="https://mastodon.social/tags/QGIS" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>QGIS</span></a> <a href="https://mastodon.social/tags/numpy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>numpy</span></a></p>