On Friday, January 14, 2011, dstaley wrote:
>
> Warning, I am a python noob. Not only do I not know python, I really don't
> know anything about programming outside of ArcInfo and the ancient AML
> language. Regardless, here is my problem
>
> Let's say I have three text files (test1.txt, tes
I'm trying to fix again a case with x*log(y) which was a converted
log(0**0), where x and y should broadcast.
Is it possible to get a special function for this. It shows up very
often, and any cheap fix, e.g.
term = x*np.log(y)
term[(x==0)*(y==0)] = 0
raises a warning (which I now also see)
x*
> textlist = ["test1.txt", "test2.txt", "test3.txt"]
>
> for i in textlist:
> text_file = open(textlist, "a")
> text_file.write("\nI suck at Python and need help")
> text_file.close()
>
> But, this doesn't work. It gives me the error:
>
> coercing to Unicode: need string or buffe
Warning, I am a python noob. Not only do I not know python, I really don't
know anything about programming outside of ArcInfo and the ancient AML
language. Regardless, here is my problem
Let's say I have three text files (test1.txt, test2.txt and test3.txt).
Each text file has 1 line of te
maybe just cosmetic, I just found this
>>> stats.poisson.b
1.#INF
>>> np.isinf(stats.poisson.b)
True
>>> np.isinf(-stats.poisson.b)
True
>>> np.isposinf(stats.poisson.b)
array(True, dtype=bool)
>>> np.isneginf(stats.poisson.b)
array(False, dtype=bool)
>>> np.isneginf(-stats.poisson.b)
array(True,
Oops .. I guess isnan() inside the weave code just works fine. Should have tried this first. By the way, is there any speed lost doing this? Should I convert all NaN values into a integer and use it inside the weave inline c code?-Joon On Fri, 14 Jan 2011 14:03:16 -0600, Joon Ro wrote:
Hi,I was wo
On Fri, Jan 14, 2011 at 12:03 PM, Joon Ro wrote:
> Hi,
> I was wondering if it is possible to process (in if statement - check if the
> given value is NaN) numpy NaN value inside the weave.inline c code.
>
> testcode = '''
> if (test(0)) {
> return_val = test(0);
> }
> '''
>
> err = weave.in
Hi,I was wondering if it is possible to process (in if statement - check if the given value is NaN) numpy NaN value inside the weave.inline c code.testcode = '''if (test(0)) { return_val = test(0);}'''err = weave.inline(testcode, ['test'], type_converters = converters.blit
On Fri, Jan 14, 2011 at 9:26 AM, Gael Varoquaux
wrote:
> On Thu, Jan 13, 2011 at 10:49:17AM -0800, David Cortesi wrote:
>> As to why I'm using Python 3, it's because I'm starting a new project
>> with no prior dependencies and want the current and future language --
>> which is now TWO FRAKKIN' YE
On Thu, Jan 13, 2011 at 10:49:17AM -0800, David Cortesi wrote:
> As to why I'm using Python 3, it's because I'm starting a new project
> with no prior dependencies and want the current and future language --
> which is now TWO FRAKKIN' YEARS OLD! -- but that's a rant for another
> time.
Oh, you're
10 matches
Mail list logo