-
Notifications
You must be signed in to change notification settings - Fork 132
Numpy+images #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Numpy+images #141
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The _equal code doesn't seem to be used by the WE library. Can this be moved __init__.py in tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is also used as World.operator== - I am not sure if there are any world-comparisons in the code outside of the tests. But I guess it is worth a try and the code can be moved, yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought the removal would leave the world-class without a functioning equality-operator. At the same time it is not only usable for that class... I wouldn't feel good about moving this to the tests, I prefer it here. (I found quite a lot of functions spread over various files that are never called or even referenced... maybe it is time for a bit of cleanup, though.)
|
You'll need to add PyPNG to tox.ini |
|
Ok, thanks. Since this #144 (comment) is now merged, I should probably rename the worldengine-data files to fit the new format (py3_seed...). I was away all day and didn't manage to do it before I left. I will finish everything up as soon as possible and hopefully the tests will run fine again. :) |
…sion of the threshold.
…arrays. Some smaller functions make use of numpy now.
… river-maps with numpy maps.
…esponsible for half of all function calls during world-generation (i.e. tens of millions).
Added support for 16 Bit grayscale images that will be used for heightmaps and during black_and_white export.
This makes more use of numpy, even though only for the exports (and those don't take too much time anyway). I also put some work into the GDAL export() method; there might have been a bug or two and I wanted to give worldengine the opportunity to make use of more of the formats GDAL supports. (Even though I don't like GDAL since it was a pain to install. I created an instruction, though. Maybe it can be added somewhere.)
In draw.py I added an import for the PyPNG-library which is used to export 16 Bit grayscale images.
All of this is based on this #138 and there may be some things in here that need a bit of discussion. Due to some of the changes and the connection to #138 this will not pass the tests for now.
EDIT: Oh, Travis doesn't know the PyPNG-module I imported. Well, this still needs a tiny bit of polish. :)