Skip to content

additional constructors for Zeros and Ones #94

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

Closed
CarloLucibello opened this issue May 2, 2020 · 1 comment · Fixed by #233
Closed

additional constructors for Zeros and Ones #94

CarloLucibello opened this issue May 2, 2020 · 1 comment · Fixed by #233

Comments

@CarloLucibello
Copy link
Contributor

It would be nice to have Zeros(eltype, dims) and Ones(eltype, dims), in analogy to zeros and ones functions

@dlfivefifty
Copy link
Member

What do these do that Zeros{eltype}(dims) / Ones{eltype}(dims) do not?

In principle it's not a good idea to have synonyms in code, as it makes find-and-replace more difficult, for example.

dlfivefifty added a commit that referenced this issue Mar 28, 2023
* Add Zeros(T, n...) and Ones(T, n...) constructors (#94(

* increase coverage
dlfivefifty added a commit that referenced this issue Mar 29, 2023
* Add Zeros(T, n...) and Ones(T, n...) constructors (#94( (#233)

* Add Zeros(T, n...) and Ones(T, n...) constructors (#94(

* increase coverage

* Update README.md

* Move over OneElement from Zygote

* Add tests

* Update oneelement.jl

* add tests

* Update runtests.jl

* add docs
dlfivefifty added a commit that referenced this issue Mar 30, 2023
* StepRangeLen to support 0 step size in cumsum #226 (#230)

* use StepRangeLen to support 0 step size

* v0.13.11

* allow special casing on ∞ length

* Restore ± special cases

* Update runtests.jl

* fix more tests

* Update runtests.jl

* Structured Broadcasting (#228)

* Structured Broadcasting

* add jishnubs tests

* Update runtests.jl

* Fix #97 by adding promote_rules (#234)

* Move OneElement from Zygote and overload setindex (#161) (#235)

* Add Zeros(T, n...) and Ones(T, n...) constructors (#94( (#233)

* Add Zeros(T, n...) and Ones(T, n...) constructors (#94(

* increase coverage

* Update README.md

* Move over OneElement from Zygote

* Add tests

* Update oneelement.jl

* add tests

* Update runtests.jl

* add docs

* ensure type in array convert (#237)

* increase coverage

* add convert tests

* v1.0

* `_fill_dot` support general vectors (#229)

* Update fillalgebra.jl

* promote_op

* add breaking test

* add breaking test

* fix

* accept round-off errors

* Update test/runtests.jl

Co-authored-by: Sheehan Olver <[email protected]>

* update

* support inf and nan

* fix 1.6

* Update fillalgebra.jl

* Update fillalgebra.jl

* trying to fix Julia 1.6

* comments

* Update runtests.jl

* add @inferred

---------

Co-authored-by: Sheehan Olver <[email protected]>

---------

Co-authored-by: Jishnu Bhattacharya <[email protected]>
Co-authored-by: Tianyi Pu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants