Opened 12 years ago

Closed 12 years ago

#6497 closed defect (fixed)

[with patch, positive review] symbolic functions should understand numpy arrays

Reported by: robertwb Owned by: burcin
Priority: major Milestone: sage-4.1.2
Component: calculus Keywords:
Cc: Merged in: Sage 4.1.1.rc0
Authors: Robert Bradshaw Reviewers: Burcin Erocal
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

We want

sage: import numpy
sage: sin(numpy.arange(5))
array([ 0.        ,  0.84147098,  0.90929743,  0.14112001, -0.7568025 ])

Attachments (1)

6497-numpy-sin.patch (1.2 KB) - added by robertwb 12 years ago.

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by robertwb

comment:1 Changed 12 years ago by burcin

  • Authors set to Robert Bradshaw
  • Reviewers set to Burcin Erocal
  • Summary changed from [with patch, needs review] symbolic functions should understand numpy arrays to [with patch, positive review] symbolic functions should understand numpy arrays

This depends on #5081.

comment:2 Changed 12 years ago by mvngu

  • Summary changed from [with patch, positive review] symbolic functions should understand numpy arrays to [with patch, needs work] symbolic functions should understand numpy arrays

With the patches at #5081 and #6506, and 6497-numpy-sin.patch on this ticket, I got one doctest failure:

sage -t -long devel/sage-main/sage/modules/vector_double_dense.pyx
**********************************************************************
File "/scratch/mvngu/release/sage-4.1.1.alpha1/devel/sage-main/sage/modules/vector_double_dense.pyx", line 663:
    sage: v.stats_kurtosis()
Expected:
    -1.23
Got:
    doctest:106: SyntaxWarning: assertion is always true, perhaps remove parentheses?
    -1.23
**********************************************************************
1 items had failures:
   1 of   6 in __main__.example_29
***Test Failed*** 1 failures.
For whitespace errors, see the file /scratch/mvngu/release/sage-4.1.1.alpha1/tmp/.doctest_vector_double_dense.py
	 [2.5 s]

comment:3 follow-up: Changed 12 years ago by robertwb

  • Summary changed from [with patch, needs work] symbolic functions should understand numpy arrays to [with patch, positive review] symbolic functions should understand numpy arrays

I am unable to reproduce the error above on 4.1.1, so I am re-instating the positive review. (Also, the error itself seems totally unrelated to this patch.)

comment:4 in reply to: ↑ 3 Changed 12 years ago by mvngu

Replying to robertwb:

I am unable to reproduce the error above on 4.1.1, so I am re-instating the positive review. (Also, the error itself seems totally unrelated to this patch.)

The above error is not due to the patch. Ticket #6825 contains steps to reproduce the errors.

comment:5 Changed 12 years ago by mvngu

  • Merged in set to Sage 4.1.1.rc0
  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.