MCPcopy Create free account
hub / github.com/ml-explore/mlx-data / scale

Function scale

mlx/data/core/image/ImageTransform.cpp:33–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33std::shared_ptr<Array> scale(
34 const std::shared_ptr<const Array>& image,
35 double scale) {
36 int64_t tw = std::lround(scale * width(image));
37 int64_t th = std::lround(scale * height(image));
38 return resize(image, tw, th);
39}
40
41std::shared_ptr<Array>
42resize(const std::shared_ptr<const Array>& image, int64_t dw, int64_t dh) {

Callers 1

apply_imageMethod · 0.85

Calls 3

resizeFunction · 0.85
widthFunction · 0.70
heightFunction · 0.70

Tested by

no test coverage detected