Alexandre B A Villares · @villares
23 followers · 42 posts · Server pynews.com.br
Alexandre B A Villares · @villares
23 followers · 41 posts · Server pynews.com.br
Erik W. Bjønnes · @Erik_W_B
99 followers · 604 posts · Server mastodon.gamedev.place

Spent the day programming for the first time in ages, and on the one hand it’s great how large the ecosystem is and how quickly I can get something up. On the other hand, it didn’t take long before I wished I was back in or even ..!

The amount of foot guns, trip mines and quicksand was #%^*! Luckily helped keep me on track for the most part.

Perhaps it’s time to check out using python libraries from rust…

#python #rustlang #cplusus #numpy

Last updated 1 year ago

Alexandre B A Villares · @villares
20 followers · 35 posts · Server pynews.com.br
Alexandre B A Villares · @villares
20 followers · 34 posts · Server pynews.com.br
Dan Gohman · @sunfish
1532 followers · 426 posts · Server hachyderm.io

On the latest Bytecode Alliance community stream, a look at componentize-py, including a demo of running in a component!

youtube.com/watch?v=lbZ0ywLkBD

#numpy #wasm

Last updated 1 year ago

How decomposing objects into lower-dimensional faces helps to determine intersections and containment: onkeypress.blogspot.com/2023/0 Part of an ongoing project to extend to higher dimensions.

#4d #raytracing #cgi #python #numpy

Last updated 1 year ago

Michał Górny · @mgorny
186 followers · 853 posts · Server pol.social

Myślicie, że jest wam dzisiaj gorąco?

Najpierw walczyłem z nowym segfaultem w 2 z Pythonem 3.12. Nie udało mi się zajść daleko, co najwyżej ustalić, że to .

github.com/pydantic/pydantic/i

Potem testowałem świeży snapshot — tylko po to, by odkryć, że testy znów padly na 32-bitowych platformach. Po bisect'cie, okazało się, że przyczyną była zmiana "NFCi" (niezamierzająca zmian funkcjonalnych) do logiki hashowania — wygląda na to, że LLVM drukuje teraz funkcje w kolejności zależnej od platformy.

reviews.llvm.org/D158217#46009

Na koniec walczyłem z segfaultem w testach . Najwyraźniej jest to regresja związana z betą 1.26.0, więc wypracowałem backtrace i zgłosiłem błąd.

github.com/numpy/numpy/issues/

#python #gentoo #numpy #trimesh #llvm #heisenbug #pydantic

Last updated 1 year ago

Sergi · @sergi
33 followers · 500 posts · Server floss.social

I really liked @t_redactyl's talk about optimization with . I thought it was going to be the typical the typical "arrays are quicker than loops and that's it", but I didn't know about broadcasting and really liked the trick with sorting.

I also liked a lot the time taken to explain how lists work on memory vs arrays.

Check it out at youtu.be/8Nwk-elxdEQ

#Python #numpy

Last updated 1 year ago

Tom Larrow · @TomLarrow
465 followers · 1092 posts · Server vis.social

Today's is some inset rectangle packing. Rather than storing all these as objects as in a traditional packing algorithm, it is evaluating the pixel array as a numpy array, and then comparing the values and making sure they are all the same value

This is really inefficient, and takes more than an hour to generate an image, but this was more my way of learning more functions and deepening my understanding

Code: codeberg.org/TomLarrow/creativ

#creativecoding #py5 #python #numpy

Last updated 1 year ago

Andreas Dutzler · @adtzlr
3 followers · 15 posts · Server mathstodon.xyz

Why are the "batch" axes always the leading axes in NumPy? I designed all my packages to use the trailing axes as batch axes because this seems more natural to me. Now I'm thinking about switching to NumPy's convention - just to make things more intuitive for NumPy users. Any ideas on that?

#numpy #batch #python

Last updated 1 year ago

py5coding · @py5coding
135 followers · 178 posts · Server fosstodon.org

Just added two new methods `to_pil()` and `get_np_pixels()` to the Sketch, Py5Graphics, and Py5Image classes in . The first will return a PIL Image object and the second will get pixels as a array. Both further the goal of further integrating py5 into the ecosystem.

#py5 #numpy #python

Last updated 1 year ago

Stark · @Stark9837
485 followers · 2536 posts · Server techhub.social

@pixeltracker @guetto

For research projects where I use and , I actually like using ! It is just easier to run code and view my plots.

With , you can even have widgets like sliders and other stuff.

It just speeds up my prototyping and makes me more productive. Naturally, only my plotting code and math exist in the .ipynb, and the rest is just imported from normal .py files. Thus, it allows for quick conversions once the prototyping is done.

@Python

#numpy #matplotlib #jupyter #pyqt #qt #python

Last updated 1 year ago

Barrett · @ba66e77
12 followers · 55 posts · Server fosstodon.org

I know it's common in to import as `pd` and as `np`, but I just hate it.

For some reason it takes me extra brain power to decipher `pd` to pandas when I'm reading over modules. I'd rather improve readability and type a bit more when I'm writing the program.

Is it just me?

#python #pandas #numpy

Last updated 1 year ago

WhizKidz · @whizkidz
3 followers · 9 posts · Server mslink.com

Join us on a journey to Python: Across the Numpy-Verse on September 3rd at 5:30 PM - 7:00 PM PST. Sign up for free at meetup.com/whizkidz-computer-p.

#coding #data_science #free #numpy #programming #python #spiderman

Last updated 1 year ago

Tom Larrow · @TomLarrow
448 followers · 978 posts · Server vis.social

Sometimes I go into a session wanting to make something specific. Other times I wonder what will happen if I try something weird

This is one of those. I use to draw short lines on the screen, then capture the pixel array in a array. Then I use the NumPy command roll to literally roll those pixels values around the array writing them back to the canvas when they are in different positions. This is the result after thousands of positions

Code codeberg.org/TomLarrow/creativ

#numpy #py5 #creativecoding

Last updated 1 year ago

Clément Robert · @neutrinoceros
108 followers · 229 posts · Server fosstodon.org

3.0 is (almost) out !

(binaries are being deployed right now, so it should be available in a couple hours)

github.com/cython/cython/relea

This is exciting news for our ecosystem because it's the first stable version able to *not* generate deprecated C-API code. When it's widely adopted, Numpy devs will finally be able to move forward with performance optimisations that were not possible without breaking everyone's favourite package !

#cython #numpy

Last updated 1 year ago

dillonniederhut · @dillonniederhut
95 followers · 98 posts · Server fosstodon.org

If you use , upper bound your dependencies to <2.0 now.

Also, as of 1.25, you no longer need to use oldest-supported-numpy in your builds.

@scipy2023

#numpy

Last updated 1 year ago

stark@techhub.social:~$ █ · @Stark9837
380 followers · 2007 posts · Server techhub.social

@r000t @dillonniederhut

Isn't that the rule? If your code is slow, use . If you need more speed and optimization, implement it out of first principles in C?

#numpy #python

Last updated 1 year ago

dillonniederhut · @dillonniederhut
73 followers · 56 posts · Server fosstodon.org

It's really hard to write native C code for operating on arrays that works faster than . Even in 1D.

Why? NumPy makes extensive use of SIMD.

- Christopher Ariza at

#numpy #SciPy2023

Last updated 1 year ago