Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Enhance contract to support keyword arguments during reduction #32

Merged
merged 2 commits into from
Jul 17, 2023

Conversation

jofrevalles
Copy link
Member

Summary

Following from the PR #31, this PR modifies the contract(tensors...) function to support kwargs, therefore allowing them to be passed to the contract(tensor1, tensor2) function.

This change is useful since Tenet.contract(expr::EinExpr) calls the contract method with the dims keyword argument, leading to an error due to the absence of handling kwargs in the contract(tensors...) function.

With this update, the dims argument (as well as other potential keyword arguments) can be appropriately handled during the tensor contraction process.

@codecov
Copy link

codecov bot commented Jul 17, 2023

Codecov Report

Merging #32 (e7cd1dc) into master (fdcb1d7) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master      #32   +/-   ##
=======================================
  Coverage   82.98%   82.98%           
=======================================
  Files           6        6           
  Lines         241      241           
=======================================
  Hits          200      200           
  Misses         41       41           
Impacted Files Coverage Δ
src/Numerics.jl 88.13% <100.00%> (ø)

src/Numerics.jl Outdated Show resolved Hide resolved
@mofeing mofeing merged commit 7acb59f into master Jul 17, 2023
5 checks passed
@mofeing mofeing deleted the fix/extend-contract branch July 17, 2023 12:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants