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

685 ravel function + 696 reshape infer dimension #690

Merged
merged 31 commits into from
Mar 24, 2021
Merged

Conversation

mtar
Copy link
Collaborator

@mtar mtar commented Oct 27, 2020

Description

This PR adds a ravel functionality to heat. It works mostly the same as flatten, but it uses shallow copies / views for the data when split=0.
Issue/s resolved: #685

Reshape infers the shape if one unknown dimension -1 is specified.
Issue/s resolved: #696

Changes proposed:

  • add ravel function
  • fix tests for flatten
  • reshape with one unknown dimension

Type of change

  • New feature

Due Diligence

  • All split configurations tested
  • Multiple dtypes tested in relevant functions
  • Documentation updated (if needed)
  • Updated changelog.md under the title "Pending Additions"

Does this change modify the behaviour of other functions? If so, which?

no

@mtar mtar added the enhancement New feature or request label Oct 27, 2020
@codecov
Copy link

codecov bot commented Oct 27, 2020

Codecov Report

Merging #690 (b511899) into master (442c271) will increase coverage by 0.18%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #690      +/-   ##
==========================================
+ Coverage   95.82%   96.00%   +0.18%     
==========================================
  Files          63       63              
  Lines        8071     8091      +20     
==========================================
+ Hits         7734     7768      +34     
+ Misses        337      323      -14     
Flag Coverage Δ
gpu 95.11% <100.00%> (+0.17%) ⬆️
unit 94.38% <100.00%> (+0.18%) ⬆️

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

Impacted Files Coverage Δ
heat/core/dndarray.py 96.61% <100.00%> (+0.13%) ⬆️
heat/core/manipulations.py 99.24% <100.00%> (+0.01%) ⬆️
heat/core/stride_tricks.py 98.03% <100.00%> (ø)
heat/cluster/kmedians.py 96.07% <0.00%> (+25.49%) ⬆️

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 442c271...b511899. Read the comment docs.

@mtar mtar changed the title Feature/685 ravel 685 ravel function + 696 reshape infer dimension Nov 12, 2020
@mtar mtar marked this pull request as ready for review November 18, 2020 15:23
Copy link
Contributor

@ClaudiaComito ClaudiaComito left a comment

Choose a reason for hiding this comment

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

Hi @mtar, looks good! I only have some minor requests.

CHANGELOG.md Outdated Show resolved Hide resolved
heat/core/manipulations.py Outdated Show resolved Hide resolved
heat/core/manipulations.py Outdated Show resolved Hide resolved
heat/core/manipulations.py Outdated Show resolved Hide resolved
heat/core/manipulations.py Outdated Show resolved Hide resolved
heat/core/manipulations.py Outdated Show resolved Hide resolved
heat/core/manipulations.py Outdated Show resolved Hide resolved
coquelin77
coquelin77 previously approved these changes Jan 11, 2021
Copy link
Member

@coquelin77 coquelin77 left a comment

Choose a reason for hiding this comment

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

only a doc comment (missed function link) everything else looks good

heat/core/dndarray.py Outdated Show resolved Hide resolved
@coquelin77 coquelin77 dismissed ClaudiaComito’s stale review March 24, 2021 09:40

All comments have been addressed

@coquelin77 coquelin77 merged commit 99aec49 into master Mar 24, 2021
@coquelin77 coquelin77 deleted the feature/685-ravel branch March 24, 2021 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reshape with unknown dimension (-1) is not supported implement 'ravel'
3 participants