MCPcopy Create free account
hub / github.com/numpy/numpy / npyrational_fill

Function npyrational_fill

numpy/core/src/umath/_rational_tests.c:862–873  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

860}
861
862static int
863npyrational_fill(void* data_, npy_intp length, void* arr) {
864 rational* data = (rational*)data_;
865 rational delta = rational_subtract(data[1],data[0]);
866 rational r = data[1];
867 npy_intp i;
868 for (i = 2; i < length; i++) {
869 r = rational_add(r,delta);
870 data[i] = r;
871 }
872 return 0;
873}
874
875static int
876npyrational_fillwithscalar(void* buffer_, npy_intp length,

Callers

nothing calls this directly

Calls 2

rational_subtractFunction · 0.85
rational_addFunction · 0.85

Tested by

no test coverage detected