GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove direct complex arithmetic due to Windows · numpy/numpy@d9bfd27

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • numpy/core/src/multiarray
    • arraytypes.c.src
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎numpy/core/src/multiarray/arraytypes.c.src‎

Copy file name to clipboardExpand all lines: numpy/core/src/multiarray/arraytypes.c.src
+13-2Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3984,8 +3984,19 @@ static int
39843984
@NAME@_fill(@type@ *buffer, npy_intp length, void *NPY_UNUSED(ignore))
39853985
{
39863986
npy_intp i;
3987-
@type@ start = buffer[0];
3988-
@type@ delta = buffer[1] - start;
3987+
@type@ start = NPY_@NAME@_INIT(0.0, 0.0);
3988+
@type@ delta = NPY_@NAME@_INIT(0.0, 0.0);
3989+
3990+
NPY_@NAME@_SET_REAL(&start, NPY_@NAME@_GET_REAL(buffer));
3991+
NPY_@NAME@_SET_IMAG(&start, NPY_@NAME@_GET_IMAG(buffer));
3992+
NPY_@NAME@_SET_REAL(&delta, NPY_@NAME@_GET_REAL(&buffer[1]) - NPY_@NAME@_GET_REAL(&start));
3993+
NPY_@NAME@_SET_IMAG(&delta, NPY_@NAME@_GET_IMAG(&buffer[1]) - NPY_@NAME@_GET_IMAG(&start));
3994+
start.real = buffer->real;
3995+
start.imag = buffer->imag;
3996+
delta.real = buffer[1].real;
3997+
delta.imag = buffer[1].imag;
3998+
delta.real -= start.real;
3999+
delta.imag -= start.imag;
39894000

39904001
buffer += 2;
39914002
for (i = 2; i < length; i++, buffer++) {

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.