![]() Somehow, it's added a new dimension at the beginning, not at the end! What's the way to go? In Matlab you would just sayĪnd if you try that with np.tile you'll find that B has shape (1,1024,1536). A quick search will tell you that the function to use is numpy.tile, and that's indeed true.īut, say that you have an image of shape (1024,512) and you'd like it to become (1024,512,3). I find myself wanting to use a repmat function in Python - used as I am to Matlab's syntax. This post is partly to remind myself of this, partly for others who might find themselves in a similar situation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |