Skip to content

Commit

Permalink
Pass kwargs in rand on power manifold (#174)
Browse files Browse the repository at this point in the history
* Pass kwargs in rand on power manifold

* formatting
  • Loading branch information
mateuszbaran authored Nov 17, 2023
1 parent 4332265 commit 81d2d93
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.15.3] 17/11/2023

### Fixed

- Pass kwargs in `rand!` for `AbstractPowerManifold` to appropriate methods on the wrapped manifold.

## [0.15.2] 8/11/2023

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ManifoldsBase"
uuid = "3362f125-f0bb-47a3-aa74-596ffd7ef2fb"
authors = ["Seth Axen <seth.axen@gmail.com>", "Mateusz Baran <mateuszbaran89@gmail.com>", "Ronny Bergmann <manopt@ronnybergmann.net>", "Antoine Levitt <antoine.levitt@gmail.com>"]
version = "0.15.2"
version = "0.15.3"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
6 changes: 4 additions & 2 deletions src/PowerManifold.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1144,14 +1144,15 @@ function Random.rand!(M::AbstractPowerManifold, pX; vector_at = nothing, kwargs.
rep_size = representation_size(M.manifold)
if vector_at === nothing
for i in get_iterator(M)
rand!(M.manifold, _write(M, rep_size, pX, i))
rand!(M.manifold, _write(M, rep_size, pX, i); kwargs...)
end
else
for i in get_iterator(M)
rand!(
M.manifold,
_write(M, rep_size, pX, i);
vector_at = _read(M, rep_size, vector_at, i),
kwargs...,
)
end
end
Expand All @@ -1167,7 +1168,7 @@ function Random.rand!(
rep_size = representation_size(M.manifold)
if vector_at === nothing
for i in get_iterator(M)
rand!(rng, M.manifold, _write(M, rep_size, pX, i))
rand!(rng, M.manifold, _write(M, rep_size, pX, i); kwargs...)
end
else
for i in get_iterator(M)
Expand All @@ -1176,6 +1177,7 @@ function Random.rand!(
M.manifold,
_write(M, rep_size, pX, i);
vector_at = _read(M, rep_size, vector_at, i),
kwargs...,
)
end
end
Expand Down

2 comments on commit 81d2d93

@mateuszbaran
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release notes:

Fixed

  • Pass kwargs in rand! for AbstractPowerManifold to appropriate methods on the wrapped manifold.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/95493

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.15.3 -m "<description of version>" 81d2d93978527120dc95bc628a08f3197a3c6c9c
git push origin v0.15.3

Please sign in to comment.