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

TESNORGET as mutable numpy ndarray #54

Merged
merged 1 commit into from
Feb 8, 2021
Merged

Conversation

alonre24
Copy link
Collaborator

@alonre24 alonre24 commented Feb 4, 2021

Add an option to return mutable numpy object in TENSORGET command (by default it returns immutable). This will copy the tensor's blob.

…by default it returns mutable). This will copy the tensor's blob.
@alonre24 alonre24 self-assigned this Feb 4, 2021
@codecov
Copy link

codecov bot commented Feb 4, 2021

Codecov Report

Merging #54 (6427625) into master (740fac0) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #54      +/-   ##
==========================================
+ Coverage   97.10%   97.14%   +0.03%     
==========================================
  Files           6        6              
  Lines         657      666       +9     
==========================================
+ Hits          638      647       +9     
  Misses         19       19              
Impacted Files Coverage Δ
redisai/client.py 93.63% <100.00%> (ø)
redisai/postprocessor.py 100.00% <100.00%> (ø)
redisai/utils.py 97.50% <100.00%> (+0.13%) ⬆️
test/test.py 99.71% <100.00%> (+<0.01%) ⬆️

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 740fac0...6427625. Read the comment docs.

@sonarcloud
Copy link

sonarcloud bot commented Feb 4, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@hhsecond hhsecond left a comment

Choose a reason for hiding this comment

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

Looks good to me apart from one UX suggestion

@@ -335,7 +335,7 @@ def tensorset(self,
return res if not self.enable_postprocess else processor.tensorset(res)

def tensorget(self,
key: AnyStr, as_numpy: bool = True,
key: AnyStr, as_numpy: bool = True, as_numpy_mutable: bool = False,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the mutability turned on by default? i.e as_numpy_mutable: bool = True

@alonre24 alonre24 merged commit 7fdd126 into master Feb 8, 2021
@hhsecond hhsecond deleted the tensorget_as_mutable_numpy branch February 14, 2021 12:08
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 this pull request may close these issues.

None yet

2 participants