JuliaML / JuliaML/MLUtils.jl

fill_like default eltype should be the one of the fill value

Open
#183 0 comments 0 reactions 0 assignees View on GitHub
breaking
Dominant language
Julia
Stars
124
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Right now we have the signature
```
fill_like(x::AbstractArray, val, [element_type=eltype(x)], [dims=size(x)]))
```
I think it should be
```
fill_like(x::AbstractArray, val, [element_type=typeof(val)], [dims=size(x)]))
```
instead.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the fill_like definition and any existing tests for its default element type. Check how the default is selected when val differs from eltype(x), and verify that the default follows typeof(val) while explicit element_type and dims arguments retain their behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.