Re: name 'sys' is not defined

2019-12-29 Thread Frank Millman
On 2019-12-30 7:20 AM, safiq...@gmail.com wrote: Deal all, Could you please help me how can I avoid this problem my Jupyter Notebook code was help pls [snip] NameError: name 'sys' is not defined I know nothing about Jupyter Notebook but somewhere, usually at the top, you have to add this

name 'sys' is not defined

2019-12-29 Thread safiq713
Deal all, Could you please help me how can I avoid this problem my Jupyter Notebook code was help pls # init a treemix analysis object with some param arguments tmx = ipa.treemix( data=data, imap=imap, minmap=minmap, seed=123456, root="Petronia_petronia", m=2, ) error

Re: '%Y' in strftime() vs. strptime()

2019-12-29 Thread Eryk Sun
On 12/29/19, Johannes Bauer wrote: > x = d(1, 1, 1) > x.strftime("%Y-%m-%d") > '1-01-01' The default padding depends on the platform strftime. POSIX strftime [1] supports an extension of ISO C that allows specifying the "0" pad character and minimum field width, e.g. "%04Y-%02m-%02d".

'%Y' in strftime() vs. strptime()

2019-12-29 Thread Johannes Bauer
Hi list, I've just stumbled upon a strange phaenomenon and I'm wondering if it's a bug. Short and sweet: Python 3.7.3 (default, Oct 7 2019, 12:56:13) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from datetime import datetime as d >>> x = d(1,

With distutils, "optional" C extension module error is fatal

2019-12-29 Thread Dan Stromberg
Hi folks. I'm putting a little time into getting my treap module (like a dict, but always sorted by key) working with distutils. I want it to be able to compile and install the Cython version from an included .c file, or to fall back on a pure python version if that fails. I'm currently using: s