Hello to all.
I’m not good at python, but despite my research I can’t find a way to search by domain on python.
In fact I’m surprised by the time it takes the FDom - > CSet - > MIndex function compared to the Bar Graph output.
The goal would be to know the number of occurrences (of Set) in my list of numbers.
I have a really large number of numbers, in this example I only deal with 100.000 numbers but in my real project we are talking about 2.000.000 at least, the calculation time takes me 10-15min, I was hoping that a python script would allow me to go faster.
Thanks for reading, and don’t hesitate to guide me
test member index.gh (912.6 KB)
I’m updating the topic, I still can’t find a function that would be interesting under python
I tried this python script (attached in the gh file) but without success, the resolution time is longer than the native components of grasshooper
Someone would have a wonderful idea to submit ?
test member index.gh (919.6 KB)
In fact my goal would be to extract the results of the bar graph (i.e. the number of data according to a defined interval)
Thanks a lot @maje90
You found a way in C#
The end of the code is not great (I did it myself), which is why I still have to go through splits to get the final list.
But the time saving is just CONSIDERABLE
Here the code in the GH file
test member index V2.gh (1.8 MB)
Just to show you the time savings in the context of my project:
with FDom + CSet + Mindex around 30-35min …
with C# around 20 sec !!!
Hoping that it will help other people