translate works with any shape input, add docs