[sage-support] Re: Integration bug?

2018-10-02 Thread Simon King
On 2018-10-02, kcrisman  wrote:
> Please do.  It's likely something related to 
> https://trac.sagemath.org/ticket/21440 and 
> https://trac.sagemath.org/wiki/symbolics#Integrationtickets where you can 
> browse to your heart's content :-) For some reason the wrong branch seems 
> to get chosen by Maxima at times.

OK, I'll add the example at #21440.

Best regards,
Simon

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Integration bug?

2018-10-02 Thread kcrisman


On Monday, October 1, 2018 at 4:55:14 PM UTC-4, Simon King wrote:
>
> Hi! 
>
> I get the following with sage-8.4.beta5: 
>   sage: f(x) = cos(pi*x) 
>   sage: (f(x)*exp(-I*pi*x)).integral(x)(x=1/2) - 
> (f(x)*exp(-I*pi*x)).integral(x)(x=-1/2) 
>   1/2 
>   sage: (f(x)*exp(-I*pi*x)).integral(x,-1/2,1/2) 
>   1 
>
> The previous two expressions are not equal, but I think they should be 
> equal. Is it a stupid mistake of mine (but then, Wolfram alpha does the 
> same stupid mistake), is it a known bug, or a new bug (in that case I 
> should create some ticket, that would probably be my first on 
> calculus...)? 
>

Please do.  It's likely something related to 
https://trac.sagemath.org/ticket/21440 and 
https://trac.sagemath.org/wiki/symbolics#Integrationtickets where you can 
browse to your heart's content :-) For some reason the wrong branch seems 
to get chosen by Maxima at times.

For what it's worth:

sage: (f(x)*exp(-I*pi*x)).integral(x,-1/2,1/2,algorithm='sympy') 
1/2

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Sage and Canvas LMS

2018-10-02 Thread kcrisman


> > Any info on this would be appreciated! 
> > 
>
> For what it is worth, we have not added any LTI integration yet to 
> https://CoCalc.com, but it is on our roadmap, and we've been thinking 
> about it recently. 
>
>
That is good news.  We have tried to integrate WeBWorK locally with our LMS 
but it is nontrivial; anything making this "really easy" would help 
adoption of CoCalc (potentially, at least) with institutions which require 
all work to be graded or noted on their LMS.  (Thankfully, we do not have 
this requirement!)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Deleting all zero rows in a matrix

2018-10-02 Thread Nils Bruin
On Tuesday, October 2, 2018 at 12:56:54 AM UTC-7, jamison...@vanderbilt.edu 
wrote:
>
>
> How can I delete the all zero rows (rows 2 and 3) for
>
> all any entry of a matrix. I tried the for loop below, but it
>
> doesn't store any of the values and only gives one lines. Please Help!
>
>
> If you know your matrix is in echelon form then you're just looking for a 
submatrix and you can get it by slicing:

A=matrix(GF(q),[[0,0,0],[1,1,0],[0,1,1],[1,0,1]])
E=A.echelon_form()
E[:E.rank(),:]

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Sage and Canvas LMS

2018-10-02 Thread William Stein
On Tue, Oct 2, 2018 at 12:56 AM Mathew Reed  wrote:
>
> I was wondering if Sage could be used for gradable assignments in an LMS, 
> such as Canvas?
> I'm using the LTI which works fine when inserted into an Assignment. 
> Typically, assignments are summative and count toward a students overall 
> grade and the results displayed in a gradebook.
> However, when testing from a students perspective, it seems that calculations 
> can be evaluated, but not 'submitted' for grading.
>
> Any info on this would be appreciated!
>

For what it is worth, we have not added any LTI integration yet to
https://CoCalc.com, but it is on our roadmap, and we've been thinking
about it recently.

 -- William

-- 
William (http://wstein.org)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Deleting all zero rows in a matrix.

2018-10-02 Thread John Cremona
On Tue, 2 Oct 2018 at 08:56,  wrote:

> If I have a matrix  [1,0,1] [0,1,1] [0,0,0], [0,0,0], how do I delete the
> zero rows? (in this case rows 2 and 3). I know how to manually delete them,
> but what about for all cases, regardless of input. I want to have all the 0
> rows deleted in any matrix. Please Help!
>

sage: M = Matrix([[1,0,1], [0,1,1], [0,0,0], [0,0,0]])
sage: M
[1 0 1]
[0 1 1]
[0 0 0]
[0 0 0]
sage: Matrix(r for r in M.rows() if r)
[1 0 1]
[0 1 1]



> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-support@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Deleting all zero rows in a matrix

2018-10-02 Thread jamison . donohue
A=matrix(GF(q),[[0,0,0],[1,1,0],[0,1,1],[1,0,1]])
E=A.echelon_form()

Given matrix E, 

[1 0 1]
[0 1 1]
[0 0 0]
[0 0 0]



How can I delete the all zero rows (rows 2 and 3) for

all any entry of a matrix. I tried the for loop below, but it

doesn't store any of the values and only gives one lines. Please Help!



for i in range(-1,A.rank()-1):
i=i+1
G=E.matrix_from_rows([i])
G   


[0 1 1]

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.