![]() |
|
![]() |
| The broadcasting doc is surprisingly readable and easy to follow. And the rules are surprisingly simple. The diagrams and examples are excellent. https://numpy.org/doc/stable/user/basics.broadcasting.html
After taking the time to work through that doc and ponder some real-world examples, I went from being very confused by broadcasting to employing intermediate broadcasting techniques in a matter of weeks. Writing out your array dimensions in the same style of their examples (either in a text file or on a notepad) is the key technique IMO:
And of course with practice you can do it in your head. |
![]() |
| Yeah, Tullio.jl is a great package. Basically, it is just a macro for generating efficient for loops.
I guess, it might be hard to achieve similar feature in Python without metaprogramming. |
![]() |
| > The default integer type on Windows is now int64 rather than int32, matching the behavior on other platforms
This was a footgun due to C long being int32 in win64. Glad that they changed it. |
![]() |
| No. Native python ops in string suck in performance. String support is absolutely interesting and will enable abstractions for many NLP and LLM use cases without writing native C extensions. |
![]() |
| > Native python ops in string suck in performance.
That’s not true? Python string implementation is very optimized, probably have similar performance to C. |
![]() |
| i think it’s fair to say that perl6 has been an “extremely rocky transition” ultimately it was renamed raku to reflect this and avoid camping on the perl5 version numbering
raku has good package compatibility via Inline::Perl5 and Inline::Python and FFI to languages like Rust and Zig among the many downsides of the transition, one upside is that raku is a clean sheet of paper and has some interesting new work for example in LLM support I have started work on a new raku module called Dan::Polars and would welcome contributions from Numpy/Pandas folks with a vision of how to improve the APIs and abstractions … it’s a good place to make a real contribution, help make something new and better and get to grips with some raku and some rust. just connect via https://github.com/librasteve/raku-Dan-Polars if you are interested and would like to know more |
![]() |
| (I suggest you start with https://raku.guide (like the Rust Book) and also take a look at https://docs.raku.org/language/5to6-nutshell)
the raku package manager - zef comes bundled with the rakudo compiler - I use https://rakubrew.org https://raku.land is a directory of raku packages I would say that zef is very good (it avoids the frustrations of Python package managers like pip and conda) like perl before it, raku was designed with packages and installers in mind with a concern for a healthy ecosystem for example, all versions (via the META6.json payload descriptor) carry versioning and the module version descriptor is a built in language type https://docs.raku.org/type/Version that does stuff like this:
and this
and this
(of course, authors must authenticate to upload modules) |
![]() |
| I'm starting to see some packages break due to not pinning 1.x in their dependencies. `pip install numpy==1.*` is a quick and hacky way to work around those issues until the ecosystem catches up. |
![]() |
| > X months of work by Y contributors?
Makes it look like they pressed publish before filling in their template, or is this on purpose? |
![]() |
| So apparently this is what broke my CI job since it was indirectly installed. One of the downsides of using loose version locking with requirements.txt rather than something like poetry I guess. |
![]() |
| What are the implications of the new stringdtype? If I remember correctly, string performance was a big part of the pandas switch to arrow. |
The thing I want most is a more sane and more memorable way to compose non-element-wise operations. There are so many different ways to build views and multiply arrays that I can’t remember them and never know which to use, and have to relearn them every time I use numpy… broadcasting, padding, repeating, slicing, stacking, transposing, outers, inners, dots of all sorts, and half the stack overflow answers lead to the most confusing pickaxe of all: einsum. Am I alone? I love numpy, but every time I reach for it I somehow get stuck for hours on what ought to be really simple indexing problems.