20 Reputation

14 years, 246 days

How to expand and collect a series expan...

Maple 2015

Even for very common functions Maple has trouble calculating a series expansion if the center is not zero.

series(sin(x),x=0);

works as expected. But choosing x = 1 as center yields

series(sin(x),x=1);

This strange behavior also happens with other standard functions like cos, cosh, sinh.

Same problem with copying code from text...

Maple

Thought it would be a neat way to create identation for loops and if branches in a text editor and copy the code into Maple. But Maple inserts a new prompt at the beginning of every line.

Is there a solution in 2018?

CodeGeneration[Python] returning round b...

Maple 18

CodeGeneration returns round brackets when converting a matrix to numpy. According to Python syntax it should return square brackets. I am using Maple 18, so maybe this issue has been solved in more recent releases.

MWE

----------------
>restart:
>with(CodeGeneration):
>QLoc:=proc()
local Q:
Q:= Matrix(2,2):
Q(1,1) := 1E5:
Q(2,2) := 1E4:
Q(1,2) := 1E3:
Q(2,1) := 1E3:
return Q:
end proc:

>Python(QLoc);

import numpy

def QLoc ():
Q = numpy.mat([[0,0],[0,0]])
Q(1, 1) = 0.1e6
Q(2, 2) = 0.1e5
Q(1, 2) = 0.1e4
Q(2, 1) = 0.1e4
return(Q)

------------

 Page 1 of 1
﻿