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

add constructors for uninitialized arrays #32

Closed
wants to merge 1 commit into from

Conversation

bjarthur
Copy link

@bjarthur bjarthur commented Mar 19, 2024

title says it all. tests pass locally on julia 1.3:

julia> CircularArray{Float32}(undef, 2,3)
2×3 CircularArray(::Matrix{Float32}):
 NaN  4.7198      3.6f-43
 NaN  4.5642f-41  0.0

Copy link

codecov bot commented Mar 19, 2024

Codecov Report

Attention: Patch coverage is 56.52174% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 86.30%. Comparing base (ec93323) to head (b6f58ba).

Files Patch % Lines
src/CircularArrays.jl 56.52% 10 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##            master      #32       +/-   ##
============================================
- Coverage   100.00%   86.30%   -13.70%     
============================================
  Files            1        1               
  Lines           50       73       +23     
============================================
+ Hits            50       63       +13     
- Misses           0       10       +10     
Flag Coverage Δ
unittests 86.30% <56.52%> (-13.70%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Vexatos
Copy link
Owner

Vexatos commented Mar 19, 2024

Genuinely not sure about this one. CircularArrays is a generic package that supports all types of AbstractArray. I am not too fond of the idea of adding utility methods which are hardcoded to the standard Array type. And typing CircularArray(Array{Float32}(undef, 2, 3)) is not that much more work.

@Vexatos
Copy link
Owner

Vexatos commented Apr 18, 2024

After thinking about it more, I still maintain that this doesn't belong in a generic package. The "verbose" way to create such an array mentioned above isn't that much more work, and this is functionality that could easily be added to a separate, higher-level package.

@Vexatos Vexatos closed this Apr 18, 2024
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.

2 participants