Closed bowen-xu closed 10 months ago
Unfortunately I had already started modularizing, just not yet commited. But let's see how we can combine it as you have some potential improvements in there which I don't have! Does the Numpy dependence and custom deepcopy make it faster? If so, how much?
Does the Numpy dependence and custom deepcopy make it faster? If so, how much?
Currently no. It makes the program 15% slower. But it would be more convenient to use numpy if you consider to optimize the code. For example, in localObserve function, we can use subscripts to access an area of the array, and it would be much faster than using loops. Of course it's not necessary to use numpy.
@patham9 I'll close this pr and wait for your update on the modularized code.
I have added it, I also used part of your PR like the separate prettyprint.py I didn't have before.
Seperate
nace.py
into several files for maintainability.