Ask Your Question

jack77's profile - activity

2019-04-18 21:16:18 +0200 received badge  Nice Question (source)
2018-06-21 23:16:16 +0200 received badge  Famous Question (source)
2017-07-21 15:01:35 +0200 received badge  Famous Question (source)
2015-12-20 17:58:18 +0200 received badge  Notable Question (source)
2015-09-26 17:34:11 +0200 received badge  Popular Question (source)
2015-06-06 19:03:55 +0200 received badge  Notable Question (source)
2015-01-30 20:56:30 +0200 commented answer preparse(False) (still) not working

@Christ what is about

RememberInteger=Integer ... Integer=int ... Integer= RememberInteger

2014-06-29 21:38:46 +0200 received badge  Famous Question (source)
2014-06-29 21:38:46 +0200 received badge  Notable Question (source)
2014-06-29 21:38:46 +0200 received badge  Popular Question (source)
2014-06-29 17:55:06 +0200 received badge  Notable Question (source)
2014-06-29 17:55:06 +0200 received badge  Popular Question (source)
2014-05-12 13:50:00 +0200 commented answer howto get Sage doctest coverage statistics

@tmonteil is it also possible to get the branch test coverage for Sage?

2014-05-12 06:22:34 +0200 commented answer howto get Sage doctest coverage statistics

What do you think, is the number misleading? Sage uses external libraries, but their test code coverage is not recognized, if available at all.

2014-05-12 06:20:24 +0200 marked best answer howto get Sage doctest coverage statistics

For a particular file:

sage --coverage <filename>

For all Sage library:

sage --coverageall

For Sage 6.2, the overall weighted coverage score is 93.7%.

The doc is available here.

2014-05-12 06:20:24 +0200 received badge  Scholar (source)
2014-05-12 05:56:26 +0200 asked a question howto get Sage doctest coverage statistics

How can a user get/see recent Sage doctest coverage statistics?

Thanks,

Jack

2013-10-04 14:04:01 +0200 received badge  Popular Question (source)
2013-08-01 16:36:01 +0200 answered a question Add Numpy array into other Numpy array

Hello,

I do not know, if this construction is useful, but you could do the following:

 import numpy as np


 L1 = np.array( [1,2] )                         
 L2 = np.array( [1,2,3] )
 L3 = np.array( [3,2,2,3] )

 L = np.array( [L1, L2, L3], dtype=object )

 L[0] # will return array([1, 2])

if the number of the basic arrays are not known or is variable,
you could compose a command string and then use

count = 3
cmdstr = "L = np.array(["
for i in range(1, count):   cmdstr = cmdstr+ 'L'+str(i)+','
cmdstr = cmdstr+ 'L'+str(count)
cmdstr = cmdstr+"], dtype=object)"
cmdstr # : 'L = np.array([L1,L2,L3], dtype=object)'

exec(cmdstr) # L will be = array([[1 2], [1 2 3], [3 2 2 3]], dtype=object)

Remark: it did'nt work neither with np.concatenate nor with np.append

2013-08-01 11:18:54 +0200 answered a question Working with multiplicative groups

Hello,


I fear, creating finite multiplicative groups over Zp is not possible yet.

You could create an isomorphic one , e.g. for p = 7:

AbelianGroup([7])

but that is probably not what you want...

2013-07-31 20:31:28 +0200 received badge  Commentator
2013-07-31 20:31:28 +0200 commented answer Testing inequalities in sage

but it should!

2013-07-31 20:31:00 +0200 commented answer Compare symbolic expressions

I'm sorry, but this design is a failure - to return False when the result is Unknown. This should definitely be fixed.

2013-07-29 05:16:23 +0200 answered a question replace values in Numpy array

Hello,

when assigning N to K, no data is copied, so you working on the original data, To keep the original, you need a deep copy of N:

 K=N.copy()
2013-07-27 21:01:04 +0200 commented question Add Numpy array into other Numpy array

what did you tried so far to fill the POPOPO array?

2013-07-27 20:49:32 +0200 commented question Testing inequalities in sage

@eviatar-bach returning False in case can't be determined whether a relation holds seems to me unwise ; This should be changed to a tristate-answer, whatever the third state is

2013-07-27 20:19:27 +0200 commented question Add Numpy array into other Numpy array

Hello mresimulator, what type of arrays are the L1, L2,.. are they one-dimensional? btw, did you solve the problem already?

2013-07-17 05:28:31 +0200 commented question Solve: 1-4i/4i(1+4i)^-1

is this homework?

2013-07-16 06:54:59 +0200 commented question How can you stop warnings from printing?

why did you not accept the answer from John?

2013-07-16 06:54:28 +0200 answered a question How can you stop warnings from printing?

Hello,

you should fix the code as suggested by John, and use

Arrangements(vals,2).list()

instead of

arrangements(vals,2)

but just for completeness, you can force Python to shut up with adding

import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
2013-07-16 06:41:08 +0200 answered a question list building - consecutive

Hello mresimulator,



I do not know, why you want to encode the index j in the name,
but you could use 'exec()' for this:

import numpy as np
N = 4
A = 3
for j in srange(N):
   exec('L'+str(j)+"=np.empty(A)")

Then L1 to L4 gets defined:

>>> L1
array([  9.79748720e-251,   2.90930926e-252,   2.34745402e-251])
2013-07-12 05:18:09 +0200 commented answer construction of product rings Z/nZ x Z/mZ

'You can do it with just the groups' - you mean using summand_projection? 'of course that's not what you want' - yes, I would like something more comfortable

2013-07-12 05:13:28 +0200 commented answer construction of product rings Z/nZ x Z/mZ

Well, the question is, is there a way to construct the product ring Z/nZ x Z/mZ in sage

2013-07-11 18:46:09 +0200 asked a question construction of product rings Z/nZ x Z/mZ

Hello,

is it possible in Sage to construct a product ring of two integer modulo rings?

When just creating an cartesian_product, it is for example not possible to add its elements:

R5=Integers(5)
R3=Integers(3)
CR=R5.cartesian_product(R3)
elem=CR((3,2)) # ok, element construction
elem*elem # ok
elem+elem # fails 
CR.list() #  not implemented
CR.list_of_elements_of_multiplicative_group # not implemented
2013-07-11 18:16:34 +0200 commented answer get multiplicative subgroup of Z/nZ

Hello, I'm not sure if I have an account for the sagemath tracker. Did you open an issue ticket for return value of 'list_of_elements_of_multiplicative_group' ?

2013-07-11 17:35:55 +0200 received badge  Supporter (source)
2013-07-11 17:20:12 +0200 edited question get multiplicative subgroup of Z/nZ

Is it possible to get a multiplicative group object of integers modulo n?

For example for n=15 the elements are {1,2,4,7,8,11,13,14}

Of course I can get the elements itself with

R = Integers(15)

R.list_of_elements_of_multiplicative_group()

but not as a group.

It is also possible to construct the isomorphic group C2 x C4, but then the elements are not integers:

G=AbelianGroup([2,4])