inconsistant `var` result when array has only one element

Open
#178 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
julia
Domain
backend

Research direction

Start by reading the implementation of varmult and its tests, then compare its one-element behavior with Julia's Statistics.var([1]). The issue shows that varmult(*, [1]) returns 0.0 while var([1]) returns NaN; determine the intended behavior and add a regression test for the agreed result.

Written by the indexing model from the issue text.

Description

breaking bug
julia> using Statistics

julia> varmult(*, [1])
0.0

julia> var([1])
NaN
Dominant language
Julia
Stars
59
Forks
24
Avg merge
13h 2m
Merged PRs (30d)
15

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JuliaGraphics/ColorVectorSpace.jl

All issues in JuliaGraphics/ColorVectorSpace.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.