Skip to content

preparser issue with recurssive loading of .sage files #6305

@williamstein

Description

@williamstein
Hi,
I'm not sure if it's a bug or it's me doing something wrong.

I have two files:

test1.sage containing nothing but
  print numpy.random.normal(0,(2*0.0061*0.33)^(1/2),1)

and

test2.sage containing
  load "test1.sage"


I import numpy
sage: import numpy

Now
sage: load "test1.sage"
returns values always smaller than 1
thats the right distribution, the same i get when using the notebook-
interface

but
sage: load "test2.sage"
very often returns values bigger than 1,
thats a whole different distribution

My system is ubuntu-9.04-amd64 on Pentium Dual Core
sage-4.0.1 from 2009-06-06

to which Marshall responds:

I'm not sure what is happening but I would guess that at some point
the ^(1/2) gets turned into ^(0), and then your standard deviation
goes from .06... to 1.  I.e., it seems like maybe the preparser
doesn't catch these nested loadings.

-M. Hampton

Component: misc

Issue created by migration from https://trac.sagemath.org/ticket/6305

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions