« first day (1798 days earlier)      last day (1424 days later) » 

7:26 AM
@AndrasDeak I've never had to do that so far, but even within a single project I have to rely on the IDE to know how and what can be imported from where.
And so far I found no acceptable solution to make the imports work for both if I want to run the main file and seperately also want to be able to run a file in a child module also as a main file.
 
 
2 hours later…
9:29 AM
@flawr executable modules are yet another kettle of fish...
as a rule of thumb the vast majority of modules should be either executable, or importable.
Having multiple executable points in your module is not a good idea.
One of my packages is installable, can be executed with python -m ... and its submodules can be imported (some can be used for postprocessing). But there only the main package is executable.
 
10:10 AM
@AndrasDeak I agree that this is the case for the "final" product, but during development I frequently need to do that even if just for tracking down a bug or testing something.
Many times I also just write my "unit tests for the lazy lizard" in the if __name__ == "__main__": at the bottom of the file:)
 
@flawr yeah, that's bad :P
you could try replacing that strategy with doctests
or just start using a proper suite
I heard it also helps with development
 
11:07 AM
too much work, I'd rather spend my time complaining about it
in the end the code is not really relevant, just the numbers and pictures that come out if it:)
@AndrasDeak but do you actually use any of those? I heard about the doctests but but these just take sooo much space:)
they are so ungolfy
 
11:44 AM
@flawr no, but I don't write tests for my projects :P If I did I'd use a full test suite
 
12:30 PM
0
Q: Index in position 1 exceeds array bounds (must not exceed 99999)

acfI'm learning how to work with the FVCOM model (unstructured-grid, finite-volume, free-surface, 3-D primitive equation coastal ocean circulation model). The mesh shows the west coast of Scotland. And the hydrofiles have the variables of different days (velocity, salinity and temperature). I hav...

There was an earlier question (probably deleted now) with the exact same error, including the 99999, also about velocities etc
Can't find it any more though
 
no MCVE
 
error is trivial though, just OP is kidna clueless.
 
no argument there
 
 
2 hours later…
2:50 PM
d'oh, bfloat16 and float16 are apparently not the same thing (different number of bits in exponent/base)
I'm gonna invent floatfloat that uses 4 bits to say how the number of bits is distributed flips table
Arbitrary size integers I love you.
Now I just need an arbitrary speed processor.
 
@flawr sounds like a speedometer in FREEDOM-units, those are arbitrary enough
 
haha
Maybe the trick of multiplying the speed by 50 that Cris taught us can be applied repeatedly? :D
 
 
7 hours later…
9:50 PM
@flawr That works only until you start approaching the speed of light, at which point the effect of that multiplication becomes increasingly smaller.
 

« first day (1798 days earlier)      last day (1424 days later) »