Skip to content
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

feat: Add transpose function to tensorlib #1696

Merged
merged 5 commits into from
Nov 11, 2021

Conversation

matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert commented Nov 11, 2021

Description

As TensorFlow does not support a .transpose() or .T functionality for EagerTensors add a transpose function to the tensorlib API.

This is needed for PR #1694.

Checklist Before Requesting Reviewer

  • Tests are passing
  • "WIP" removed from the title of the pull request
  • Selected an Assignee for the PR to be responsible for the log summary

Before Merging

For the PR Assignees:

  • Summarize commit messages into a comprehensive review of the PR
* Add transpose function to tensorlib
* Add test for transpose
* Fix a backend name typo in the JAX backend docstrings

@matthewfeickert matthewfeickert added feat/enhancement New feature or request API Changes the public API labels Nov 11, 2021
@matthewfeickert matthewfeickert self-assigned this Nov 11, 2021
@matthewfeickert matthewfeickert added the tests pytest label Nov 11, 2021
@matthewfeickert matthewfeickert marked this pull request as ready for review November 11, 2021 19:07
@codecov
Copy link

codecov bot commented Nov 11, 2021

Codecov Report

Merging #1696 (4add9d3) into master (e7c0fce) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1696   +/-   ##
=======================================
  Coverage   98.05%   98.06%           
=======================================
  Files          64       64           
  Lines        4220     4228    +8     
  Branches      587      587           
=======================================
+ Hits         4138     4146    +8     
  Misses         49       49           
  Partials       33       33           
Flag Coverage Δ
contrib 25.40% <50.00%> (+0.04%) ⬆️
doctest 61.21% <100.00%> (+0.07%) ⬆️
unittests 96.38% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/pyhf/tensor/jax_backend.py 97.16% <100.00%> (+0.04%) ⬆️
src/pyhf/tensor/numpy_backend.py 98.51% <100.00%> (+0.02%) ⬆️
src/pyhf/tensor/pytorch_backend.py 98.46% <100.00%> (+0.02%) ⬆️
src/pyhf/tensor/tensorflow_backend.py 97.29% <100.00%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e7c0fce...4add9d3. Read the comment docs.

@matthewfeickert matthewfeickert added the docs Documentation related label Nov 11, 2021
@matthewfeickert matthewfeickert merged commit 2b2b281 into master Nov 11, 2021
@matthewfeickert matthewfeickert deleted the feat/add-transpose-to-tensorlib branch November 11, 2021 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Changes the public API docs Documentation related feat/enhancement New feature or request tests pytest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants