JuliaArrays / JuliaArrays/FillArrays.jl

Empty Tuple Method

Open
#167 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
187
Forks
41
Avg merge
17h 29m
Merged PRs (30d)
1

Description

When Zeros or Ones gets an empty tuple as its only argument, perhaps we should return zero or one? This way functions that can be called on both arrays and numbers can be simplified, instead of having to special-case numbers.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by locating the definitions and tests for Zeros and Ones, then inspect how an empty tuple is currently handled as the sole argument. Done means the empty-tuple cases return zero and one respectively, with tests covering both behaviors and confirming existing array cases remain unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.