I just realized properly OOP in Mathematica has been eminently possible since at least V9:
b = System`Utilities`HashTable[];
a = b;
System`Utilities`HashTableAdd[a, 1, 2];
System`Utilities`HashTableToAssociation[b]
<|1 -> 2|>
b = <||>;
a = b;
a[1] = 2;
b
<||>
That mutability means that we can just use a HashTable backend and do things exactly like we would in python...
I've generated a line from extracting some pixel positions from an image, and I'm now trying to turn that back into an Image, but can't figure out how to do that and keep the original coordinate system
@Szabolcs I actually saw that one a bit ago. It seems pretty cool. Looks like it uses ByteArray to serialize data so as long as that gets translated into an efficient python-side data structure (i.e. not list-of-lists of python numbers) we may not even need MathLink? Still not entirely clear to me how it works, but...hopefully it's fast.
Is there a function similar to Partition (or option for it) that lets me drop some elements in between each subset? For instance f[{1,2,3,4,5,6,7,8,9,10,11}]={{1,2},{4,5},{7,8},{10,11}}
I can use something like Take[#, 2] & /@ Partition[pts, 3], but feels like something that is probably a built-in
Is there a neat way to partition a list into sublists of fixed length $n$, discarding a fixed number $k$ elements between each one?
E.g for $n=3, k=1$,
f[Range[1,11],3,1]={{1,2},{4,5},{7,8},{10,11}}
I can do it with
Take[#, 2] & /@ Partition[pts, 3]
(or wrapped into a function) but I was ...
I am trying to schedule a meeting. 5pm today, the meetup room in Homewood Suites, a hotel next to the conference hotel.
If anyone is around, please come :)
Hi @CarlWoll . I'm a physics phd student at UW. Lawrence Y. suggested I get in touch with you regarding a conference we're organizing. (Specifically, it was mentioned that you're active on Mathematica.SE - hence this message!) If you'd like to get in touch, please check my profile for email. Thanks!
@J.M.iscomputer-less @Alucard If I had the time I think it'd be fun to revisit some cohort analysis of StackExchange posters I did a while back to look at what the use cases look like now