8000 NumPy API surface : plan/prioritize the coverage · Issue #87 · Quansight-Labs/numpy_pytorch_interop · GitHub
[go: up one dir, main page]

Skip to content
NumPy API surface : plan/prioritize the coverage #87
@ev-br

Description

@ev-br

EDIT: the relevant list for an MVP is #87 (comment).
The rest is maybe-some-day-if-need-arises.

Splitting it off gh-86, here's the difference in API surfaces of NumPy and this wrapper. We can edit the order to reflect priorities:

>>> import numpy as np
>>> import torch_np as tnp
>>> npset = set(x for x in dir(np) if not x.startswith('_') and not inspect.ismodule(x) and not x[0].isupper())
>>> tnpset = set(dir(tnp))
>>> for name in sorted(npset - tnpset):
...        print("-[ ]", name)

EDIT: now lightly edited:

Lower prio:

memmap
ndenumerate
ndindex
nditer
nested_iters
setxor1d
setdiff1d
vectorize
trapz
trim_zeros
version
sort_complex
flatiter
union1d
unpackbits
packbits

Low prio if at all:

array2string
array_repr
array_str
busday_count
busday_offset
busdaycalendar
byte_bounds
bytes_
cast
ctypeslib
deprecate
deprecate_with_doc
format_float_positional
format_float_scientific
format_parser
get_array_wrap
get_include
get_printoptions
getbufsize
geterr
geterrcall
geterrobj
obj2sctype
poly
poly1d
polyadd
polyder
polydiv
polyfit
polyint
polymul
polynomial
polysub
polyval
sctype2char
sctypeDict
seterr
seterrcall
seterrobj
set_numeric_ops
set_printoptions
set_string_function
setbufsize
shares_memory
source
tracemalloc_domain (?)
test
testing
use_hugepage
who
save
savetxt
savez
savez_compressed
show_config
show_runtime
frombuffer
fromfile
fromfunction
fromiter
frompyfunc
fromregex
fromstring
genfromtxt
base_repr
binary_repr
may_share_memory
broadcast
printoptions
issctype
issubsctype
require
lookfor
load
loadtxt
mask_indices
kernel_version
lexsort
little_endian
maximum_sctype
intersect1d

Definitely not (no pytorch equivalents):

add_docstring
add_newdoc
add_newdoc_ufunc
asmatrix
char
character
chararray
clongdouble
clongfloat
complex256
compare_chararrays
datetime64
datetime_as_string
datetime_data
flexible
float128
isnat
is_busday
longcomplex
longdouble
longfloat
matrix
rec
recarray
recfromcsv
recfromtxt
record
ushort
uint
uint16
uint32
uint64
uintc
uintp
ulonglong
unicode_
void
spacing
str_
string_
timedelta64
safe_eval
numarray
oldnumeric
object_
fastCopyAndTranspose (deprecated in numpy)
msort (deprecated in numpy)
disp
info
iterable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0