JuliaMath / JuliaMath/AbstractFFTs.jl

`size`, `length`, `ndims` for `Plan` inconsistent with Base usage

Open
#42 6 comments 1 reaction 0 assignees View on GitHub
Dominant language
Julia
Stars
134
Forks
40
PR merge metrics
No merged PRs in 30d

Description

Ref. https://github.com/JuliaMath/FFTW.jl/issues/159

While it is certainly useful to be able to query a `Plan` for the size of the input data it expects, using `size` for this seems wrong. It should give the dimensions of the `Plan` itself, whatever that might be. As noted in https://github.com/JuliaMath/FFTW.jl/issues/159, a `Plan` for 1d input of length `n` could be considered equivalent to a matrix with size `(n, n)`, but `size` would just return `n`.

So we might consider renaming `size` as used here, and maybe `ndims` along with it if deemed necessary to have it, noting the trivial definition `length(size(p))`. I don't see how `length` is useful, so that could maybe just be deleted.

I'm skeptical about defining `size`, `length`, `ndims` in a way (more) consistent with Base, unless we make `Plan`s iterable (and maybe even indexable), where I don't see much benefit.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.