numpy / numpy/numtype

Annotating the ufuncs

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

Nobody has claimed this yet.

numpy.ufunc stubs: Enhancement
Dominant language
Python
Stars
79
Forks
8
PR merge metrics
No merged PRs in 30d

Description

requires #88


1 in, 1 out

  • isnat
    • __call__ - #328
    • at
  • signbit
    • __call__ - #372
    • at
  • is{finite,inf,nan}
    • __call__ - #320
    • at
  • bitwise_count
  • logical_not
    • __call__ - #324
    • at
  • spacing
    • __call__ - #363
    • at
  • [arc]{cos,sin,tan}[h], exp[{2,m1}], log[{2,10,1p}], rint, sqrt
    • __call__ - #379
    • at
  • cbrt, fabs, deg2rad, degrees, radians, rad2deg
    • __call__ - #373
    • at
  • invert
  • ceil, floor, trunc
  • absolute
  • conj[ugate], reciprocal, square
  • sign, negative, positive
strings
  • is{alnum,alpha,numeric,decimal,digit,space,lower,upper,title}
    • __call__
    • at
  • str_len
    • __call__
    • at
_core.umath
  • _core.umath._[{l,r}]strip_whitespace - #404
  • _core.umath._ones_like
linalg._umath_linalg

all have signature f->f; d->d; F->F; D->D

  • det: (m,m)->(), {fdFD}->$1
  • qr_r_raw: (m,n)->(p), {dD}->$1
  • svd: (m,n)->(p), {fdFD}->$1
  • eigvals: (m,m)->(m), f->F & {dD}->D
  • eigvalsh_{lo,up}: (m,m)->(m), {fdFD}->$1
  • {cholesky_{lo,up}, inv}: (m,m)->(m,m), {fdFD}->$1

1 in, 2 out

  • frexp
  • modf
linalg._umath_linalg
  • slogdet: (m,m)->(),(), f->ff, d->dd, F->Ff, D->Dd
  • eigh_{lo,up}: (m,m)->(m),(m,m), f->ff, d->dd, F->fF, D->dD
  • eig: (m,m)->(m),(m,m), f->FF, d->DD, D->DD

1 in, 3 out

linalg._umath_linalg

f->fff, d->ddd, F->FfF, D->DdD

  • svd_f: (m,n)->(m,m),(p),(n,n)
  • svd_s: (m,n)->(m,p),(p),(p,n)

2 in, 1 out

  • logical_{and,or,xor}
    • __call__ - #324
    • at
    • reduce
    • reduceat
    • accumulate
    • outer
  • {greater,less}[_equal], [not_]equal
    • __call__
    • at
    • reduce
    • reduceat
    • accumulate
    • outer
  • ldexp
  • float_power
  • copysign, heaviside, logaddexp, logaddexp2, nextafter
    • __call__ - #376
    • at
    • reduce
    • reduceat
    • accumulate
    • outer
  • arctan2, hypot
  • divide
  • gcd, lcm, {left,right}_shift
  • bitwise_{and,or,xor}
  • fmod
  • floor_divide, remainder, mod
  • power
  • multiply, subtract
  • f{max,min}
  • maximum, minimum
  • add
  • matmul: (n?,k),(k,m?)->(n?,m?)
  • matvec: (m,n),(n)->(m)
  • vecmat: (n),(n,m)->(m)
  • vecdot: (n),(n)->()
_core.umath
  • _expandtabs, _zfill
  • _expandtabs_length
  • _[{l,r}]strip_chars
linalg._umath_linalg
  • qr_complete: (m,n),(n)->(m,m)
  • qr_reduced: (m,n),(k)->(m,k)
  • solve: (m,m),(m,n)->(m,n)
  • solve1: (m,m),(m)->(m)

2 in, 2 out

  • divmod

2 in, 3 out

_core.umath
  • _[r]partition

3 in, 1 out

_core.umath
  • _center, _{l,r}just
  • clip

3 in, 3 out

_core.umath
  • _[r]partition_index

3 in, 4 out

linalg._umath_linalg
  • lstsq: (m,n),(m,nrhs),()->(n,nrhs),(nrhs),(),(p), fff->ffif, ddd->ddid, FFf->Ffif, DDd->Ddid

4 in, 1 out

_core.umath
  • _replace
  • {end,start}swith
  • count, [r]find, [r]index

Contributor guide

Open the contributing guide

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

Resolve the prerequisite issue #88 first, then use the grouped checklist in this issue as the scope for the ufunc annotations. No source files or tests are named in the payload; done means covering the remaining listed ufunc signatures and operations, including their call, reduction, accumulation, outer, and linear-algebra variants where specified.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.