Re: Binary Sort on Python List __xor__

2020-05-31 Thread Evan Schalton
I think you're arguing both sides of the argument -- numpy arrays do have a lot of similar, related operations (because numpy uses them internally -- since they're more efficient) which means they're not fringe. I'm advocating that the built-in list class add the efficient, convenience methods

Re: I cannot download python files from external source.

2020-05-31 Thread Evan Schalton
Michio, Are you trying to open the ipynb file with python? You need Jupyter Notebook to run ipynb files. Try installing jupyter notebook (cmd: pip install jupyter) then launching the jupyter notebook py server (cmd: jupyter notebook). You should be able to use the file browser in the notebook w

Re: Binary Sort on Python List __xor__

2020-05-31 Thread Evan Schalton
Peter, This isn't a ram consideration as much it's a logical consideration. There are a lot of ways to handle this, I REALLY don't want to use a package here. Bit masking is incredibly useful for permutations/combinatoric algorithms. I can create my own class wrapper or functions, and optimize,

Re: Binary Sort on Python List __xor__

2020-05-30 Thread Evan Schalton
@MRAB, Yes -- good point, it should be the __and__ operator. do I need a new class? No, but based on this use case and other formatting techniques adding a filter method to the list class that takes in either bit mask or bool list would streamline a lot of code and not change any existing func

Binary Sort on Python List __xor__

2020-05-30 Thread evan . schalton
I frequently use binary as bool placeholders and find myself filtering lists based on those bools, this seems to have a similar semantic meaning as the bit wise ^ or __xor__ operator and could add syntactic sugar to the base list class. Use Case: Controlling a stepper at half-step has the follo