Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 722734 Details for
Bug 801205
dev-python/pweave-0.30.3-r1 fails tests
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
build.log
build.log (text/plain), 170.20 KB, created by
Agostino Sarubbo
on 2021-07-08 13:22:25 UTC
(
hide
)
Description:
build.log
Filename:
MIME Type:
Creator:
Agostino Sarubbo
Created:
2021-07-08 13:22:25 UTC
Size:
170.20 KB
patch
obsolete
> * Package: dev-python/pweave-0.30.3-r1 > * Repository: gentoo > * Maintainer: andrewammerlaan@gentoo.org > * USE: abi_x86_64 amd64 elibc_glibc kernel_linux python_targets_python3_8 python_targets_python3_9 test userland_GNU > * FEATURES: network-sandbox preserve-libs sandbox test userpriv usersandbox > > >@@@@@ PLEASE PAY ATTENTION HERE!!! @@@@@ >This information may help you to understand if this is a duplicate or if this bug exists after you pushed a fix; >This ebuild was merged at the following commit: >https://github.com/gentoo/gentoo/commit/4c495d491adc5356de170885f1e0a0428f23d59c (Thu Jul 8 11:07:57 UTC 2021) >@@@@@ END @@@@@ > > > >@@@@@ PLEASE PAY ATTENTION HERE!!! @@@@@ >This ebuild was merged (directly or as a dependency) because of the following commit: >https://github.com/gentoo/gentoo/commit/75abe61f94d29655ddccd4e001f116428b25c589 >@@@@@ END @@@@@ > > > >################## ># emerge --info: # >################## >Portage 3.0.20 (python 3.9.6-final-0, default/linux/amd64/17.1, gcc-11.1.0, glibc-2.33-r1, 4.19.174-gentoo x86_64) >================================================================= >System uname: Linux-4.19.174-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5-2650_v4_@_2.20GHz-with-glibc2.33 >KiB Mem: 264046488 total, 149561080 free >KiB Swap: 0 total, 0 free >sh bash 5.1_p8 >ld GNU ld (Gentoo 2.36.1 p3) 2.36.1 >app-shells/bash: 5.1_p8::gentoo >dev-lang/perl: 5.34.0::gentoo >dev-lang/python: 2.7.18_p11::gentoo, 3.8.11::gentoo, 3.9.6::gentoo, 3.10.0_beta3::gentoo >dev-lang/rust: 1.53.0::gentoo >dev-util/cmake: 3.20.5::gentoo >sys-apps/baselayout: 2.7-r3::gentoo >sys-apps/openrc: 0.43.3::gentoo >sys-apps/sandbox: 2.24::gentoo >sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo >sys-devel/automake: 1.16.3-r1::gentoo >sys-devel/binutils: 2.36.1-r1::gentoo >sys-devel/gcc: 11.1.0-r2::gentoo >sys-devel/gcc-config: 2.4::gentoo >sys-devel/libtool: 2.4.6-r6::gentoo >sys-devel/make: 4.3::gentoo >sys-kernel/linux-headers: 5.12::gentoo (virtual/os-headers) >sys-libs/glibc: 2.33-r1::gentoo >Repositories: > >gentoo > location: /usr/portage > sync-type: rsync > sync-uri: rsync://rsync.gentoo.org/gentoo-portage > priority: -1000 > sync-rsync-verify-jobs: 1 > sync-rsync-verify-max-age: 24 > sync-rsync-verify-metamanifest: yes > sync-rsync-extra-opts: > >ACCEPT_KEYWORDS="amd64 ~amd64" >ACCEPT_LICENSE="* BSD" >CBUILD="x86_64-pc-linux-gnu" >CFLAGS="-O2 -pipe -march=x86-64 -frecord-gcc-switches" >CHOST="x86_64-pc-linux-gnu" >CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" >CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" >CXXFLAGS="-O2 -pipe -march=x86-64 -frecord-gcc-switches" >DISTDIR="/var/tmp/portage/dev-python/pweave-0.30.3-r1/distdir" >EMERGE_DEFAULT_OPTS="--with-bdeps=y -1 -k -b" >ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" >FCFLAGS="-O2 -pipe -march=x86-64 -frecord-gcc-switches" >FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms sign split-log strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" >FFLAGS="-O2 -pipe -march=x86-64 -frecord-gcc-switches" >GENTOO_MIRRORS="http://distfiles.gentoo.org" >LANG="en_US.utf8" >LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0" >MAKEOPTS="-j24" >PKGDIR="/root/.packages" >PORTAGE_CONFIGROOT="/" >PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" >PORTAGE_TMPDIR="/var/tmp" >USE="acl amd64 bzip2 cli crypt dri elogind fortran gdbm iconv ipv6 jumbo-build libglvnd libtirpc multilib native-symlinks ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl tcpd test unicode xattr zlib" ABI_X86="64" ELIBC="glibc" KERNEL="linux" PYTHON_TARGETS="python3_8 python3_9" USERLAND="GNU" >Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS > > > > > >############################## ># emerge history (qlop -mv): # >############################## >2021-07-08T14:14:19 >>> dev-libs/libbsd-0.10.0 >2021-07-08T14:14:20 >>> dev-libs/libsodium-1.0.18_p20210617 >2021-07-08T14:14:21 >>> dev-python/strict-rfc3339-0.7-r1 >2021-07-08T14:14:22 >>> dev-python/entrypoints-0.3-r2 >2021-07-08T14:14:23 >>> dev-python/pandocfilters-1.4.3 >2021-07-08T14:14:24 >>> dev-python/pycurl-7.43.0.6 >2021-07-08T14:14:25 >>> dev-python/appdirs-1.4.4-r1 >2021-07-08T14:14:26 >>> dev-python/ptyprocess-0.7.0 >2021-07-08T14:14:27 >>> dev-python/six-1.16.0 >2021-07-08T14:14:28 >>> dev-python/pygments-2.9.0 >2021-07-08T14:14:29 >>> dev-python/mistune-0.8.4-r1 >2021-07-08T14:14:30 >>> dev-python/pyasn1-0.4.8-r1 >2021-07-08T14:14:31 >>> dev-python/async_generator-1.10 >2021-07-08T14:14:25 >>> dev-python/backcall-0.2.0 >2021-07-08T14:14:32 >>> dev-python/webencodings-0.5.1-r1 >2021-07-08T14:14:32 >>> dev-python/decorator-5.0.9 >2021-07-08T14:14:33 >>> dev-python/nose-1.3.7-r8 >2021-07-08T14:14:34 >>> dev-python/pyrsistent-0.18.0 >2021-07-08T14:14:35 >>> dev-python/jsonpointer-2.1 >2021-07-08T14:14:36 >>> dev-python/regex-2021.7.6 >2021-07-08T14:14:37 >>> dev-python/defusedxml-0.7.1 >2021-07-08T14:14:38 >>> dev-python/testpath-0.5.0 >2021-07-08T14:14:39 >>> net-libs/zeromq-4.3.4-r1 >2021-07-08T14:14:40 >>> dev-python/constantly-15.1.0-r1 >2021-07-08T14:14:41 >>> dev-python/hyperlink-21.0.0 >2021-07-08T14:14:42 >>> dev-python/pyhamcrest-2.0.2 >2021-07-08T14:14:43 >>> dev-python/ply-3.11-r1 >2021-07-08T14:14:44 >>> dev-python/typing-extensions-3.10.0.0 >2021-07-08T14:14:45 >>> dev-python/zipp-3.5.0 >2021-07-08T14:14:46 >>> dev-python/nest_asyncio-1.5.1 >2021-07-08T14:14:47 >>> dev-python/pyparsing-2.4.7-r1 >2021-07-08T14:14:48 >>> dev-python/wcwidth-0.2.5-r1 >2021-07-08T14:14:49 >>> dev-python/parso-0.8.2 >2021-07-08T14:14:50 >>> dev-python/namespace-zope-1-r1 >2021-07-08T14:14:51 >>> dev-python/pyproject2setuppy-17 >2021-07-08T14:14:52 >>> dev-python/cython-0.29.23 >2021-07-08T14:15:26 >>> dev-python/path-py-16.0.0 >2021-07-08T14:15:31 >>> dev-python/pexpect-4.8.0-r1 >2021-07-08T14:15:37 >>> dev-python/python-dateutil-2.8.1-r3 >2021-07-08T14:15:38 >>> dev-python/webcolors-1.11.1 >2021-07-08T14:15:39 >>> dev-python/rfc3339-validator-0.1.4 >2021-07-08T14:15:45 >>> dev-python/jupyterlab_pygments-0.1.2 >2021-07-08T14:15:46 >>> dev-python/docutils-0.17.1 >2021-07-08T14:15:53 >>> dev-python/pyasn1-modules-0.2.8-r1 >2021-07-08T14:16:06 >>> dev-python/html5lib-1.1 >2021-07-08T14:16:12 >>> dev-python/ipython_genutils-0.2.0-r2 >2021-07-08T14:16:23 >>> dev-python/rfc3987-1.3.8-r1 >2021-07-08T14:16:45 >>> dev-python/pycparser-2.20-r1 >2021-07-08T14:16:53 >>> dev-python/importlib_metadata-4.6.1 >2021-07-08T14:17:01 >>> dev-python/packaging-21.0 >2021-07-08T14:17:06 >>> dev-python/prompt_toolkit-3.0.19 >2021-07-08T14:17:13 >>> dev-python/jedi-0.18.0 >2021-07-08T14:17:19 >>> dev-python/zope-interface-5.4.0 >2021-07-08T14:17:28 >>> dev-python/pyzmq-22.1.0 >2021-07-08T14:17:37 >>> dev-python/pickleshare-0.7.5 >2021-07-08T14:18:04 >>> dev-python/m2r-0.2.1 >2021-07-08T14:18:18 >>> dev-python/traitlets-5.0.5 >2021-07-08T14:18:21 >>> dev-python/rfc3986-validator-0.1.1 >2021-07-08T14:18:25 >>> dev-python/cffi-1.14.5 >2021-07-08T14:18:30 >>> dev-python/markdown-3.3.4 >2021-07-08T14:18:31 >>> dev-python/click-8.0.1 >2021-07-08T14:18:33 >>> dev-python/bleach-3.3.0 >2021-07-08T14:18:48 >>> dev-python/attrs-21.2.0 >2021-07-08T14:19:11 >>> dev-python/jupyter_core-4.7.1 >2021-07-08T14:19:17 >>> dev-python/cryptography-3.4.7-r1 >2021-07-08T14:19:24 >>> dev-python/incremental-21.3.0 >2021-07-08T14:19:31 >>> dev-python/jsonschema-3.2.0 >2021-07-08T14:19:31 >>> dev-python/automat-20.2.0 >2021-07-08T14:19:45 >>> dev-python/pyopenssl-20.0.1 >2021-07-08T14:19:52 >>> dev-python/nbformat-5.1.3 >2021-07-08T14:20:01 >>> dev-python/service_identity-21.1.0 >2021-07-08T14:20:10 >>> dev-python/twisted-21.2.0-r1 >2021-07-08T14:20:24 >>> www-servers/tornado-6.1 >2021-07-08T14:20:30 >>> dev-python/jupyter_client-6.1.12 >2021-07-08T14:20:36 >>> dev-python/nbclient-0.5.3 >2021-07-08T14:20:37 >>> dev-python/ipython-7.25.0 >2021-07-08T14:20:43 >>> dev-python/nbconvert-6.0.7 >2021-07-08T14:20:48 >>> dev-python/ipykernel-5.5.4-r1 >2021-07-08T14:20:59 >>> dev-python/ipyparallel-6.3.0-r1 >2021-07-08T14:21:04 >>> dev-python/pweave-0.30.3-r1 >2021-07-08T14:21:38 >>> app-crypt/argon2-20190702 >2021-07-08T14:21:38 >>> media-fonts/dejavu-2.37 >2021-07-08T14:21:39 >>> media-fonts/stix-fonts-2.11 >2021-07-08T14:21:37 >>> dev-libs/mathjax-2.7.7 >2021-07-08T14:21:40 >>> media-libs/libpng-1.6.37-r2 >2021-07-08T14:21:41 >>> media-libs/lcms-2.12 >2021-07-08T14:21:42 >>> dev-lang/swig-4.0.2 >2021-07-08T14:21:43 >>> virtual/fortran-0 >2021-07-08T14:21:44 >>> dev-cpp/eigen-3.3.9 >2021-07-08T14:21:45 >>> media-libs/qhull-2020.2-r3 >2021-07-08T14:21:46 >>> media-libs/libjpeg-turbo-2.1.0-r2 >2021-07-08T14:21:47 >>> dev-python/pypy3-7.3.4_p2 >2021-07-08T14:24:05 >>> media-libs/freetype-2.10.4 >2021-07-08T14:24:06 >>> sci-libs/lapack-3.10.0 >2021-07-08T14:24:07 >>> virtual/jpeg-100 >2021-07-08T14:24:08 >>> dev-python/iniconfig-1.1.1 >2021-07-08T14:24:10 >>> dev-python/py-1.10.0 >2021-07-08T14:24:11 >>> dev-python/pluggy-0.13.1-r1 >2021-07-08T14:24:11 >>> dev-python/olefile-0.46-r1 >2021-07-08T14:24:12 >>> dev-python/send2trash-1.5.0-r1 >2021-07-08T14:24:09 >>> dev-python/more-itertools-8.8.0 >2021-07-08T14:24:13 >>> virtual/python-cffi-1 >2021-07-08T14:24:14 >>> dev-python/cycler-0.10.0-r1 >2021-07-08T14:24:15 >>> dev-python/pytz-2021.1 >2021-07-08T14:24:17 >>> dev-python/cppy-1.1.0 >2021-07-08T14:24:18 >>> dev-python/coverage-5.5 >2021-07-08T14:24:19 >>> dev-python/pybind11-2.6.2 >2021-07-08T14:24:16 >>> dev-python/versioneer-0.19 >2021-07-08T14:24:19 >>> dev-python/prometheus_client-0.11.0 >2021-07-08T14:24:20 >>> virtual/lapack-3.8 >2021-07-08T14:24:21 >>> virtual/cblas-3.8 >2021-07-08T14:24:22 >>> virtual/blas-3.8 >2021-07-08T14:24:23 >>> dev-python/terminado-0.10.1 >2021-07-08T14:24:24 >>> dev-lang/nasm-2.15.05 >2021-07-08T14:25:17 >>> dev-python/pytest-6.2.4-r1 >2021-07-08T14:25:20 >>> dev-python/argon2-cffi-20.1.0 >2021-07-08T14:25:31 >>> dev-python/kiwisolver-1.3.1 >2021-07-08T14:25:54 >>> sci-libs/arpack-3.8.0 >2021-07-08T14:26:00 >>> media-libs/tiff-4.3.0 >2021-07-08T14:25:51 >>> dev-python/numpy-1.21.0 >2021-07-08T14:26:26 >>> dev-python/pillow-8.3.1 >2021-07-08T14:26:16 >>> dev-python/notebook-6.4.0 >2021-07-08T14:26:44 >>> dev-python/matplotlib-3.4.2 >2021-07-08T14:26:43 >>> dev-python/scipy-1.6.3 > > > > >####################################### ># installed packages (qlist -ICvUSS): # >####################################### >acct-group/audio-0-r1:0 >acct-group/cdrom-0-r1:0 >acct-group/dialout-0-r1:0 >acct-group/disk-0-r1:0 >acct-group/input-0-r1:0 >acct-group/kmem-0-r1:0 >acct-group/kvm-0-r1:0 >acct-group/lp-0-r1:0 >acct-group/man-0-r1:0 >acct-group/messagebus-0-r1:0 >acct-group/polkitd-0-r1:0 >acct-group/portage-0:0 >acct-group/render-0-r1:0 >acct-group/sshd-0-r1:0 >acct-group/tape-0-r1:0 >acct-group/tty-0-r1:0 >acct-group/video-0-r1:0 >acct-user/man-1-r1:0 >acct-user/messagebus-0-r1:0 >acct-user/polkitd-0-r1:0 >acct-user/portage-0:0 >acct-user/sshd-0-r1:0 >app-admin/eselect-1.4.17:0 -doc -emacs -vim-syntax >app-admin/perl-cleaner-2.30:0 >app-arch/bzip2-1.0.8-r1:0/1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 split-usr -static -static-libs >app-arch/gzip-1.10:0 -pic -static >app-arch/libarchive-3.5.1:0/13 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 acl -blake2 bzip2 e2fsprogs -expat iconv -lz4 lzma -lzo -nettle -static-libs threads xattr zlib -zstd >app-arch/tar-1.34:0 acl -minimal nls -selinux xattr >app-arch/unzip-6.0_p26:0 bzip2 -natspec unicode >app-arch/xz-utils-5.2.5:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 extra-filters nls split-usr -static-libs threads >app-arch/zstd-1.5.0:0/1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -lz4 -static-libs threads >app-crypt/argon2-20190702:0/1 -static-libs >app-crypt/gnupg-2.2.28:0 bzip2 -doc -ldap nls readline -selinux smartcard ssl -tofu -tools -usb -user-socket -wks-server >app-crypt/gpgme-1.16.0:1/11 -common-lisp cxx -python python_targets_python3_8 python_targets_python3_9 -qt5 -static-libs >app-crypt/libb2-0.98.1-r3:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -native-cflags openmp -static-libs >app-crypt/openpgp-keys-gentoo-release-20200704:0 -test >app-crypt/pinentry-1.1.1-r1:0 -caps -efl -emacs -gnome-keyring -gtk ncurses -qt5 >app-crypt/rhash-1.4.1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug nls ssl -static-libs >app-editors/nano-5.8:0 -debug -justify -magic -minimal ncurses nls spell split-usr -static unicode >app-eselect/eselect-iptables-20200508:0 >app-eselect/eselect-lib-bin-symlink-0.1.1-r1:0 >app-eselect/eselect-pinentry-0.7.2:0 >app-eselect/eselect-rust-20200419:0 >app-i18n/man-pages-it-5.06:0 >app-i18n/man-pages-ja-20180315:0 >app-i18n/man-pages-l10n-4.2.0-r1:0 l10n_de l10n_fr l10n_nl l10n_pl l10n_pt-BR l10n_ro >app-i18n/man-pages-ru-5.03.2390.2390.20191017:0 >app-i18n/man-pages-zh_CN-1.6.3.2:0 >app-misc/c_rehash-1.7-r1:0 >app-misc/ca-certificates-20210119.3.66:0 -cacert >app-misc/editor-wrapper-4-r1:0 >app-misc/mime-types-9:0 >app-misc/pax-utils-1.3.2:0 -caps -debug -python -python_single_target_python3_10 -python_single_target_python3_8 python_single_target_python3_9 seccomp >app-misc/tmux-3.2a:0 -debug -selinux -utempter -vim-syntax >app-portage/eix-0.35.2:0 -debug -doc nls -sqlite >app-portage/elt-patches-20201205:0 >app-portage/gemato-16.2:0 gpg python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test -tools >app-portage/gentoolkit-0.5.1:0 python_targets_pypy3 python_targets_python3_8 python_targets_python3_9 -test >app-portage/portage-utils-0.92:0 nls openmp qmanifest qtegrity -static >app-shells/bash-5.1_p8:0 -afs -bashlogger -examples -mem-scramble net nls -plugins readline >app-shells/push-3.4:0 >app-shells/quoter-4.2:0 >app-text/ansifilter-2.18:0 -qt5 >app-text/build-docbook-catalog-1.21:0 >app-text/docbook-xml-dtd-4.5-r2:4.5 >app-text/docbook-xml-dtd-4.4-r3:4.4 >app-text/docbook-xml-dtd-4.2-r3:4.2 >app-text/docbook-xml-dtd-4.1.2-r7:4.1.2 >app-text/docbook-xsl-stylesheets-1.79.1-r2:0 -ruby >app-text/manpager-1:0 >app-text/opensp-1.5.2-r6:0 -doc nls -static-libs -test >app-text/po4a-0.63:0 -test >app-text/sgml-common-0.6.3-r7:0 >app-text/xmlto-0.0.28-r6:0 -latex -text >dev-cpp/eigen-3.3.9:3 -cpu_flags_arm_neon -cpu_flags_ppc_altivec -cpu_flags_ppc_vsx -cuda -debug -doc openmp -test >dev-db/sqlite-3.35.5:3 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug -doc -icu readline -secure-delete -static-libs -tcl -test -tools >dev-lang/nasm-2.15.05:0 -doc >dev-lang/perl-5.34.0:0/5.34 -berkdb -debug -doc gdbm -ithreads -minimal >dev-lang/python-3.10.0_beta3:3.10 -bluetooth -build -examples gdbm -hardened ipv6 ncurses readline sqlite ssl -test -tk -verify-sig -wininst xml >dev-lang/python-3.9.6:3.9 -bluetooth -build -examples gdbm -hardened ipv6 ncurses readline sqlite ssl -test -tk -verify-sig -wininst xml >dev-lang/python-3.8.11:3.8 -bluetooth -build -examples gdbm -hardened ipv6 ncurses readline sqlite ssl -test -tk -verify-sig -wininst xml >dev-lang/python-2.7.18_p11:2.7 -berkdb -bluetooth -build -examples gdbm -hardened ipv6 ncurses readline sqlite ssl threads -tk -verify-sig wide-unicode -wininst xml >dev-lang/python-exec-2.4.8:2 native-symlinks python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-lang/python-exec-conf-2.4.6:2 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 >dev-lang/rust-1.53.0:stable/1.53 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -clippy cpu_flags_x86_sse2 -debug -doc -llvm_targets_AArch64 -llvm_targets_AMDGPU -llvm_targets_ARM -llvm_targets_AVR -llvm_targets_BPF -llvm_targets_Hexagon -llvm_targets_Lanai -llvm_targets_Mips -llvm_targets_MSP430 -llvm_targets_NVPTX -llvm_targets_PowerPC -llvm_targets_RISCV -llvm_targets_Sparc -llvm_targets_SystemZ -llvm_targets_WebAssembly llvm_targets_X86 -llvm_targets_XCore -miri -nightly -parallel-compiler -rls -rustfmt -system-bootstrap -system-llvm -test -verify-sig -wasm >dev-lang/spidermonkey-78.11.0:78 -clang -cpu_flags_arm_neon -debug jit -lto -test >dev-lang/swig-4.0.2:0 -ccache -doc pcre >dev-lang/tcl-8.6.11:0/8.6 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug threads >dev-libs/elfutils-0.185:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 bzip2 -lzma nls -static-libs -test -threads utils -valgrind -zstd >dev-libs/expat-2.4.1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -examples split-usr -static-libs unicode >dev-libs/glib-2.68.3-r1:2 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -dbus -debug elf -fam -gtk-doc mime -selinux -static-libs -sysprof -systemtap -test -utils xattr >dev-libs/gmp-6.2.1-r1:0/10.4 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 asm cxx -doc -pic -static-libs >dev-libs/gobject-introspection-1.68.0:0 -doctool -gtk-doc -python_single_target_python3_10 -python_single_target_python3_8 python_single_target_python3_9 -test >dev-libs/gobject-introspection-common-1.68.0:0 >dev-libs/icu-69.1:0/69.1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug -doc -examples -static-libs >dev-libs/isl-0.24:0/23 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs >dev-libs/jsoncpp-1.9.4:0/24 -doc -test >dev-libs/libassuan-2.5.5:0 >dev-libs/libbsd-0.10.0:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs >dev-libs/libevent-2.1.12:0/2.1-7 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 clock-gettime -debug -malloc-replacement ssl -static-libs -test threads -verbose-debug >dev-libs/libffi-3.3-r2:0/7 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug -pax-kernel -pax_kernel -static-libs -test >dev-libs/libgcrypt-1.9.3:0/20 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 asm -cpu_flags_arm_neon -cpu_flags_x86_aes -cpu_flags_x86_avx -cpu_flags_x86_avx2 -cpu_flags_x86_padlock -cpu_flags_x86_sha -cpu_flags_x86_sse4_1 -doc -o-flag-munging -static-libs >dev-libs/libgpg-error-1.42:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -common-lisp nls -static-libs >dev-libs/libksba-1.6.0:0 -static-libs >dev-libs/libltdl-2.4.6:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs >dev-libs/libpcre-8.45:3 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 bzip2 cxx jit -libedit pcre16 pcre32 readline recursion-limit split-usr -static-libs unicode zlib >dev-libs/libpcre2-10.37-r2:0/3 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 bzip2 jit -libedit pcre16 pcre32 readline recursion-limit split-usr -static-libs unicode zlib >dev-libs/libpipeline-1.5.3:0 -static-libs -test >dev-libs/libsodium-1.0.18_p20210617:0/23 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 asm -cpu_flags_x86_aes -cpu_flags_x86_sse4_1 -minimal -static-libs urandom -verify-sig >dev-libs/libtasn1-4.17.0:0/6 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -doc -static-libs -test -valgrind >dev-libs/libunistring-0.9.10-r1:0/2 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -doc -static-libs >dev-libs/libuv-1.41.1:0/1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 >dev-libs/libxml2-2.9.12-r3:2 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug -examples -icu ipv6 -lzma python python_targets_python3_8 python_targets_python3_9 readline -static-libs -test -verify-sig >dev-libs/libxslt-1.1.34-r1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 crypt -debug -examples -static-libs -verify-sig >dev-libs/mathjax-2.7.7:0 -doc -examples >dev-libs/mpc-1.2.1:0/3 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs >dev-libs/mpfr-4.1.0:0/6 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs >dev-libs/nettle-3.7.3:0/8-6 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 asm -cpu_flags_arm_neon -cpu_flags_x86_aes -cpu_flags_x86_sha -doc gmp -static-libs -test >dev-libs/npth-1.6-r1:0 >dev-libs/nspr-4.32:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug >dev-libs/openssl-1.1.1k:0/1.1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 asm -bindist cpu_flags_x86_sse2 -rfc3779 -sctp -sslv3 -static-libs -test -tls-heartbeat -vanilla zlib >dev-libs/popt-1.18:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 nls -static-libs >dev-perl/Encode-EUCJPASCII-0.30.0-r1:0 -test >dev-perl/Encode-HanExtra-0.230.0-r3:0 >dev-perl/Encode-Locale-1.50.0:0 -test >dev-perl/File-Listing-6.140.0:0 -test >dev-perl/HTML-Parser-3.760.0:0 -test >dev-perl/HTML-Tagset-3.200.0-r2:0 >dev-perl/HTTP-Cookies-6.100.0:0 -test >dev-perl/HTTP-Date-6.50.0:0 >dev-perl/HTTP-Message-6.320.0:0 -test -test >dev-perl/HTTP-Negotiate-6.10.0-r1:0 >dev-perl/IO-HTML-1.4.0:0 -test >dev-perl/IO-Socket-INET6-2.720.0-r1:0 >dev-perl/IO-Socket-SSL-2.71.0:0 -examples -idn -test >dev-perl/libwww-perl-6.530.0:0 ssl -test >dev-perl/Locale-gettext-1.70.0:0 >dev-perl/LWP-MediaTypes-6.40.0:0 -test >dev-perl/LWP-Protocol-https-6.100.0:0 -test >dev-perl/MIME-Charset-1.12.2:0 l10n_ja l10n_zh >dev-perl/Module-Build-0.423.100:0 -test >dev-perl/Mozilla-CA-20999999:0 >dev-perl/Net-HTTP-6.210.0:0 -minimal -test >dev-perl/Net-SSLeay-1.880.0-r1:0 -examples -examples -minimal -test >dev-perl/Pod-Parser-1.630.0-r1:0 -test >dev-perl/SGMLSpm-1.1-r1:0 >dev-perl/Socket6-0.280.0:0 >dev-perl/TermReadKey-2.370.0:0 -examples >dev-perl/Text-CharWidth-0.40.0-r1:0 >dev-perl/Text-WrapI18N-0.60.0-r1:0 >dev-perl/TimeDate-2.330.0:0 >dev-perl/Try-Tiny-0.300.0:0 -minimal -test >dev-perl/Unicode-LineBreak-2019.1.0:0 >dev-perl/URI-1.730.0:0 -test >dev-perl/WWW-RobotRules-6.20.0-r1:0 >dev-perl/XML-Parser-2.460.0:0 >dev-perl/YAML-Tiny-1.730.0:0 -minimal -test >dev-python/appdirs-1.4.4-r1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 >dev-python/argon2-cffi-20.1.0:0 -doc python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/async_generator-1.10:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 >dev-python/attrs-21.2.0:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/automat-20.2.0:0 -examples python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/backcall-0.2.0:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/bleach-3.3.0:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/certifi-10001-r1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/cffi-1.14.5:0/1.14.5 -doc -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/chardet-4.0.0:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/click-8.0.1:0 -doc -examples python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/constantly-15.1.0-r1:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/coverage-5.5:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 >dev-python/cppy-1.1.0:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/cryptography-3.4.7-r1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/cycler-0.10.0-r1:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/cython-0.29.23:0 -doc -emacs python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/decorator-5.0.9:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 >dev-python/defusedxml-0.7.1:0 -examples python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 >dev-python/docutils-0.17.1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 >dev-python/entrypoints-0.3-r2:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/html5lib-1.1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/hyperlink-21.0.0:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/idna-3.2:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 >dev-python/importlib_metadata-4.6.1:0 -doc python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/incremental-21.3.0:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/iniconfig-1.1.1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/ipykernel-5.5.4-r1:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test -test >dev-python/ipyparallel-6.3.0-r1:0 -doc -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/ipython-7.25.0:0 -doc -examples -matplotlib -nbconvert -notebook -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -qt5 smp -test -test -test >dev-python/ipython_genutils-0.2.0-r2:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/jedi-0.18.0:0 -doc -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/jinja-3.0.1:0 -doc -examples python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/jsonpointer-2.1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 >dev-python/jsonschema-3.2.0:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/jupyter_client-6.1.12:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/jupyter_core-4.7.1:0 -doc -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/jupyterlab_pygments-0.1.2:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 >dev-python/kiwisolver-1.3.1:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/m2r-0.2.1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test -test >dev-python/markdown-3.3.4:0 -doc python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/markupsafe-2.0.1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/matplotlib-3.4.2:0 -cairo -doc -examples -excel -gtk3 -latex -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -qt5 -test -test -tk -webagg -wxwidgets >dev-python/mistune-0.8.4-r1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/more-itertools-8.8.0:0 -doc python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/namespace-zope-1-r1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 >dev-python/nbclient-0.5.3:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/nbconvert-6.0.7:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/nbformat-5.1.3:0 -doc -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/nest_asyncio-1.5.1:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/nose-1.3.7-r8:0 -examples python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/notebook-6.4.0:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/numpy-1.21.0:0 -doc lapack -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/olefile-0.46-r1:0 -doc python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/packaging-21.0:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/pandocfilters-1.4.3:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 >dev-python/parso-0.8.2:0 -doc python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/path-py-16.0.0:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/pexpect-4.8.0-r1:0 -doc -examples python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/pickleshare-0.7.5:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/pillow-8.3.1:0 -examples -imagequant jpeg -jpeg2k lcms python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test -test tiff -tk -truetype -webp -xcb zlib >dev-python/pluggy-0.13.1-r1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/ply-3.11-r1:0/3.11 -examples python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 >dev-python/prometheus_client-0.11.0:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/prompt_toolkit-3.0.19:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/ptyprocess-0.7.0:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/pweave-0.30.3-r1:0 -doc -examples -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/py-1.10.0:0 -doc python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/pyasn1-0.4.8-r1:0 -doc python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 >dev-python/pyasn1-modules-0.2.8-r1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/pybind11-2.6.2:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/pycparser-2.20-r1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 >dev-python/pycurl-7.43.0.6:0 -curl_ssl_gnutls -curl_ssl_nss curl_ssl_openssl -examples -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 ssl -test >dev-python/pygments-2.9.0:0 -doc python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/pyhamcrest-2.0.2:0 -doc -examples -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/pyopenssl-20.0.1:0 -doc python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/pyparsing-2.4.7-r1:0 -examples python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 >dev-python/pyproject2setuppy-17:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/pypy3-7.3.4_p2:0/pypy37-pp73 bzip2 gdbm jit ncurses sqlite -test -tk >dev-python/pypy3-exe-7.3.4:7.3.4 bzip2 -cpu_flags_x86_sse2 jit -low-memory ncurses >dev-python/pyrsistent-0.18.0:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/PySocks-1.7.1-r1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 >dev-python/pytest-6.2.4-r1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/python-dateutil-2.8.1-r3:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/pytz-2021.1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 >dev-python/pyzmq-22.1.0:0 -doc draft -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/regex-2021.7.6:0 -doc -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/requests-2.25.1-r2:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -socks5 -test >dev-python/rfc3339-validator-0.1.4:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/rfc3986-validator-0.1.1:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/rfc3987-1.3.8-r1:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 >dev-python/scipy-1.6.3:0 -doc -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -sparse -test >dev-python/send2trash-1.5.0-r1:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/service_identity-21.1.0:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/setuptools-57.1.0:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/setuptools_scm-6.0.1-r1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/six-1.16.0:0 -doc python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/strict-rfc3339-0.7-r1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/terminado-0.10.1:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/testpath-0.5.0:0 -doc python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/toml-0.10.2:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test -test >dev-python/traitlets-5.0.5:0 -doc -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/twisted-21.2.0-r1:0 -conch crypt -http2 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -serial -test -test >dev-python/typing-extensions-3.10.0.0:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 >dev-python/urllib3-1.26.6:0 -brotli python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/versioneer-0.19:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/wcwidth-0.2.5-r1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/webcolors-1.11.1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/webencodings-0.5.1-r1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/zipp-3.5.0:0 -doc python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-python/zope-interface-5.4.0:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-util/cmake-3.20.5:0 -doc -emacs ncurses -qt5 -test -test >dev-util/desktop-file-utils-0.26-r1:0 -emacs >dev-util/glib-utils-2.68.3:0 -python_single_target_python3_8 python_single_target_python3_9 >dev-util/gperf-3.1:0 >dev-util/gtk-doc-am-1.33.2:0 >dev-util/intltool-0.51.0-r2:0 >dev-util/itstool-2.0.6-r1:0 -python_single_target_python3_8 python_single_target_python3_9 >dev-util/meson-0.58.1:0 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >dev-util/meson-format-array-0:0 python_targets_python3_8 python_targets_python3_9 >dev-util/ninja-1.10.2-r1:0 -doc -emacs -test -vim-syntax >dev-util/pkgconf-1.7.4:0/3 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 pkg-config -test >dev-util/re2c-2.1.1-r1:0 -debug >dev-vcs/git-2.32.0:0 blksha1 -cgi curl -cvs -doc -emacs -gnome-keyring gpg -highlight iconv -mediawiki -mediawiki-experimental nls pcre -perforce -perl -ppcsha1 -python_single_target_python3_10 -python_single_target_python3_8 python_single_target_python3_9 -subversion -test threads -tk webdav -xinetd >media-fonts/dejavu-2.37:0 -fontforge -X >media-fonts/stix-fonts-2.11:0 -X >media-libs/freetype-2.10.4:2 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 adobe-cff -bindist -brotli bzip2 cleartype_hinting -debug -doc -fontforge -harfbuzz -infinality png -static-libs -utils -X >media-libs/lcms-2.12:2 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -doc -jpeg -static-libs -test threads -tiff zlib >media-libs/libjpeg-turbo-2.1.0-r2:0/0.2 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -cpu_flags_arm_neon -java -java -static-libs >media-libs/libpng-1.6.37-r2:0/16 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -apng -cpu_flags_arm_neon cpu_flags_x86_sse -static-libs >media-libs/qhull-2020.2-r3:0/8 -doc -static-libs >media-libs/tiff-4.3.0:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 cxx -jbig jpeg -lzma -static-libs -test -webp zlib -zstd >net-dns/libidn2-2.3.1:0/2 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs -verify-sig >net-firewall/iptables-1.8.7:0/1.8.3 -conntrack ipv6 -netlink -nftables -pcap split-usr -static-libs >net-libs/gnutls-3.7.2:0/30 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 cxx -dane -doc -examples -guile idn nls openssl -pkcs11 seccomp -sslv2 -sslv3 -static-libs -test -test-full tls-heartbeat -tools -valgrind >net-libs/libmnl-1.0.4:0/0.2.0 -examples split-usr -static-libs >net-libs/libnsl-1.3.0-r1:0/2 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs >net-libs/libtirpc-1.3.2:0/3 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 ipv6 -kerberos split-usr -static-libs >net-libs/nghttp2-1.43.0-r2:0/1.14 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -cxx -debug -hpack-tools -jemalloc -static-libs -test threads -utils -xml >net-libs/zeromq-4.3.4-r1:0/5 -doc drafts libbsd -pgm sodium -static-libs -test -unwind >net-misc/curl-7.77.0-r1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -adns -alt-svc -brotli -curl_ssl_gnutls -curl_ssl_mbedtls -curl_ssl_nss curl_ssl_openssl -curl_ssl_winssl ftp -gnutls -gopher -hsts http2 -idn imap ipv6 -kerberos -ldap -mbedtls -metalink -nghttp3 -nss openssl pop3 progress-meter -quiche -rtmp -samba smtp -ssh ssl -sslv3 -static-libs -telnet -test tftp -threads -winssl -zstd >net-misc/iputils-20210202:0 arping -caps -clockdiff -doc filecaps -gcrypt -idn ipv6 -nettle nls -rarpd -rdisc ssl -static -tftpd -tracepath -traceroute6 >net-misc/netifrc-0.7.3:0 >net-misc/openssh-8.6_p1-r2:0 -abi_mips_n32 -audit -bindist -debug -hpn -kerberos -ldns -libedit -livecd pam pie scp -sctp -security-key -selinux ssl -static -test -X -X509 -xmss >net-misc/rsync-3.2.3-r4:0 acl -examples iconv ipv6 -lz4 ssl -stunnel -system-zlib xattr -xxhash -zstd >net-misc/wget-1.21.1:0 -cookie_check -debug -gnutls -idn ipv6 -metalink nls -ntlm pcre ssl -static -test -uuid zlib >perl-core/File-Temp-0.231.100:0 >perl-core/Scalar-List-Utils-1.560.0:0 >sci-libs/arpack-3.8.0:0 -doc -examples -mpi >sci-libs/lapack-3.10.0:0 -deprecated -doc -eselect-ldso -lapacke -test >sys-apps/acl-2.3.1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 nls split-usr -static-libs >sys-apps/attr-2.5.1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug nls split-usr -static-libs >sys-apps/baselayout-2.7-r3:0 -build split-usr >sys-apps/busybox-1.33.1:0 -debug ipv6 -livecd -make-symlinks -math -mdev -pam -savedconfig -selinux -sep-usr static -syslog -systemd >sys-apps/coreutils-8.32-r1:0 acl -caps -gmp -hostname -kill -multicall nls -selinux split-usr -static -test -vanilla xattr >sys-apps/dbus-1.12.20-r1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug -doc elogind -selinux -static-libs -systemd -test -test -user-session -X >sys-apps/debianutils-4.11.2:0 installkernel -static >sys-apps/diffutils-3.7-r1:0 nls -static >sys-apps/file-5.40-r3:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 bzip2 -lzma -python -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -seccomp -static-libs zlib >sys-apps/findutils-4.8.0:0 nls -selinux -static -test >sys-apps/gawk-5.1.0:0 -mpfr nls readline >sys-apps/gentoo-functions-0.14:0 >sys-apps/grep-3.6:0 nls pcre -static >sys-apps/groff-1.22.4:0 -examples -uchardet -X >sys-apps/help2man-1.48.3:0 nls >sys-apps/hwids-20210613-r1:0 net pci -systemd udev usb >sys-apps/install-xattr-0.8:0 >sys-apps/iproute2-5.10.0-r1:0 -atm -berkdb -caps -elf iptables ipv6 -libbsd -minimal -selinux >sys-apps/kbd-2.4.0:0 nls pam -test >sys-apps/kmod-29:0 -debug -doc lzma -pkcs7 -python python_targets_python3_8 python_targets_python3_9 -static-libs tools zlib -zstd >sys-apps/less-590:0 pcre unicode >sys-apps/man-db-2.9.4:0 -berkdb gdbm manpager nls seccomp -selinux -static-libs zlib >sys-apps/man-pages-5.12:0 l10n_de l10n_fr l10n_it l10n_ja l10n_nl l10n_pl l10n_pt-BR l10n_ro l10n_ru l10n_zh-CN >sys-apps/man-pages-posix-2017a:0 >sys-apps/net-tools-2.10:0 arp hostname ipv6 -nis nls -plipconfig -selinux -slattach -static >sys-apps/openrc-0.43.3:0 -audit -bash -debug ncurses netifrc -newnet pam -prefix -selinux -sysv-utils unicode >sys-apps/portage-3.0.20-r6:0 -apidoc -build -doc -gentoo-dev ipc native-extensions python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 rsync-verify -selinux -test xattr >sys-apps/sandbox-2.24:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 abi_x86_32 abi_x86_64 -abi_x86_x32 >sys-apps/sed-4.8:0 acl nls -selinux -static >sys-apps/shadow-4.8.1-r3:0 acl -audit -bcrypt -cracklib nls pam -selinux -skey split-usr su xattr >sys-apps/systemd-tmpfiles-248.3:0 -selinux -test >sys-apps/sysvinit-2.99:0 -ibm -selinux -static >sys-apps/texinfo-6.8:0 nls standalone -static >sys-apps/util-linux-2.37:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -audit -build -caps cramfs -cryptsetup -fdformat -hardlink -kill logger -magic ncurses nls pam -python python_targets_python3_8 python_targets_python3_9 readline -selinux -slang split-usr -static-libs -su suid -systemd -test -tty-helpers -udev unicode >sys-apps/which-2.21:0 >sys-auth/elogind-246.10-r1:0 acl -audit -debug -doc pam policykit -selinux >sys-auth/pambase-20210201.1:0 -caps -debug elogind -gnome-keyring -homed -minimal -mktemp nullok -pam_krb5 -pam_ssh passwdqc -pwhistory -pwquality -securetty -selinux sha512 -systemd >sys-auth/passwdqc-2.0.2-r1:0 >sys-auth/polkit-0.119-r2:0 elogind -examples -gtk introspection -kde nls pam -selinux -systemd -test >sys-devel/autoconf-2.69-r5:2.69 -emacs >sys-devel/autoconf-2.13-r1:2.1 >sys-devel/autoconf-archive-2021.02.19:0 >sys-devel/autoconf-wrapper-15:0 >sys-devel/automake-1.16.3-r1:1.16 -test >sys-devel/automake-wrapper-11:0 >sys-devel/binutils-2.36.1-r1:2.36 -cet -default-gold -doc gold -multitarget nls plugins -static-libs -test -vanilla >sys-devel/binutils-config-5.4:0 native-symlinks >sys-devel/bison-3.7.6:0 -examples nls -static -test >sys-devel/flex-2.6.4-r1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 nls -static -test >sys-devel/gcc-11.1.0-r2:11 -ada -custom-cflags cxx -d -debug -doc -fixed-point fortran -go graphite -hardened -jit -libssp lto multilib nls nptl -objc -objc++ -objc-gc openmp pch -pgo pie sanitize ssp -systemtap -test -valgrind -vanilla -vtv -zstd >sys-devel/gcc-config-2.4:0 cc-wrappers native-symlinks >sys-devel/gettext-0.21-r1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 acl -cvs cxx -doc -emacs -git -java -java ncurses nls openmp -static-libs >sys-devel/gnuconfig-20210107:0 >sys-devel/libtool-2.4.6-r6:2 -vanilla >sys-devel/llvm-12.0.0:12 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug -doc -doc -exegesis -gold -libedit libffi -llvm_targets_AArch64 llvm_targets_AMDGPU -llvm_targets_ARC -llvm_targets_ARM -llvm_targets_AVR llvm_targets_BPF -llvm_targets_CSKY -llvm_targets_Hexagon -llvm_targets_Lanai -llvm_targets_Mips -llvm_targets_MSP430 llvm_targets_NVPTX -llvm_targets_PowerPC -llvm_targets_RISCV -llvm_targets_Sparc -llvm_targets_SystemZ -llvm_targets_VE -llvm_targets_WebAssembly llvm_targets_X86 -llvm_targets_XCore ncurses -test -xar -xml -z3 >sys-devel/llvm-common-12.0.0:0 >sys-devel/m4-1.4.19:0 -examples nls >sys-devel/make-4.3:0 -guile nls -static >sys-devel/patch-2.7.6-r4:0 -static -test xattr >sys-fs/e2fsprogs-1.46.2:0 -cron -fuse -lto nls split-usr -static-libs threads >sys-fs/udev-248:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 acl kmod -selinux split-usr -static-libs >sys-fs/udev-init-scripts-34:0 >sys-kernel/installkernel-gentoo-3:0 >sys-kernel/linux-headers-5.12:0 -headers-only >sys-libs/e2fsprogs-libs-1.46.2:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 split-usr -static-libs >sys-libs/gdbm-1.20:0/6 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 berkdb nls readline -static-libs >sys-libs/glibc-2.33-r1:2.2 -audit -caps -cet -compile-locales crypt -custom-cflags -doc -gd -headers-only multiarch multilib -multilib-bootstrap -nscd -profile -selinux ssp static-libs -static-pie -suid -systemtap -test -vanilla >sys-libs/libcap-2.51:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 pam split-usr -static-libs >sys-libs/libseccomp-2.5.1-r1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -python python_targets_python3_8 python_targets_python3_9 -static-libs >sys-libs/ncurses-6.2_p20210123:0/6 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -ada cxx -debug -doc -gpm -minimal -profile split-usr -static-libs -test -threads tinfo -trace unicode >sys-libs/pam-1.5.1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -audit -berkdb -debug filecaps -nis -selinux split-usr >sys-libs/readline-8.1_p1:0/8 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 split-usr -static-libs unicode -utils >sys-libs/timezone-data-2021a-r1:0 -leaps-timezone nls -zic-slim >sys-libs/zlib-1.2.11-r4:0/1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 minizip split-usr -static-libs >sys-process/procps-3.3.17:0/8 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 elogind kill -modern-top ncurses nls -selinux split-usr -static-libs -systemd -test unicode >sys-process/psmisc-23.4-r1:0 ipv6 nls -selinux -X >virtual/acl-0-r2:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs >virtual/awk-1:0 >virtual/blas-3.8:0 -eselect-ldso >virtual/cblas-3.8:0 -eselect-ldso >virtual/dev-manager-0-r2:0 >virtual/editor-0-r3:0 >virtual/fortran-0:0 openmp >virtual/jpeg-100:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs >virtual/lapack-3.8:0 -eselect-ldso >virtual/libc-1-r1:0 >virtual/libcrypt-1-r1:0/1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 static-libs >virtual/libelf-3:0/1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 >virtual/libiconv-0-r2:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 >virtual/libintl-0-r2:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 >virtual/libudev-232-r3:0/1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs -systemd >virtual/man-0-r4:0 >virtual/os-headers-0-r2:0 >virtual/package-manager-1:0 >virtual/pager-0:0 >virtual/perl-Carp-1.520.0-r1:0 >virtual/perl-Compress-Raw-Bzip2-2.101.0:0 >virtual/perl-Compress-Raw-Zlib-2.101.0:0 >virtual/perl-CPAN-Meta-2.150.10-r5:0 >virtual/perl-CPAN-Meta-Requirements-2.140.0-r7:0 >virtual/perl-CPAN-Meta-YAML-0.18.0-r7:0 >virtual/perl-Data-Dumper-2.179.0:0 >virtual/perl-Digest-MD5-2.580.0:0 >virtual/perl-Encode-3.80.0:0 >virtual/perl-Exporter-5.760.0:0 >virtual/perl-ExtUtils-CBuilder-0.280.236:0 >virtual/perl-ExtUtils-Install-2.200.0:0 >virtual/perl-ExtUtils-MakeMaker-7.620.0:0 >virtual/perl-ExtUtils-Manifest-1.730.0:0 >virtual/perl-ExtUtils-ParseXS-3.430.0:0 >virtual/perl-File-Spec-3.800.0:0 >virtual/perl-File-Temp-0.231.100:0 >virtual/perl-Getopt-Long-2.520.0:0 >virtual/perl-IO-1.460.0:0 >virtual/perl-IO-Compress-2.102.0:0 >virtual/perl-IO-Socket-IP-0.410.0:0 >virtual/perl-JSON-PP-4.60.0:0 >virtual/perl-libnet-3.130.0:0 ssl >virtual/perl-MIME-Base64-3.160.0:0 >virtual/perl-Module-Metadata-1.0.37-r1:0 >virtual/perl-parent-0.238.0-r1:0 >virtual/perl-Parse-CPAN-Meta-2.150.10-r5:0 >virtual/perl-Perl-OSType-1.10.0-r5:0 >virtual/perl-Pod-Parser-1.630.0-r8:0 >virtual/perl-podlators-4.140.0-r2:0 >virtual/perl-Scalar-List-Utils-1.560.0:0 >virtual/perl-Test-Harness-3.430.0:0 >virtual/perl-Text-ParseWords-3.300.0-r8:0 >virtual/perl-Time-Local-1.300.0:0 >virtual/perl-version-0.992.800:0 >virtual/perl-XSLoader-0.300.0-r4:0 >virtual/pkgconfig-2:0 >virtual/python-cffi-1:0 python_targets_pypy3 -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 >virtual/rust-1.53.0:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 >virtual/service-manager-1:0 >virtual/ssh-0:0 -minimal >virtual/tmpfiles-0-r1:0 >virtual/udev-217-r2:0 >virtual/yacc-0:0 >www-client/pybugz-0.13:0 python_targets_python3_8 python_targets_python3_9 -zsh-completion >www-servers/tornado-6.1:0 -doc -examples -python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test >x11-misc/shared-mime-info-2.1:0 > > >####################### ># build.log # >####################### >>>> Unpacking source... >>>> Unpacking pweave-0.30.3.tar.gz to /var/tmp/portage/dev-python/pweave-0.30.3-r1/work >>>> Source unpacked in /var/tmp/portage/dev-python/pweave-0.30.3-r1/work >>>> Preparing source in /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3 ... > * Applying pweave-0.30.3-docs.patch ... > [ ok ] > * Applying pweave-0.30.3-rm-online-tests.patch ... > [ ok ] >>>> Source prepared. >>>> Configuring source in /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3 ... >>>> Source configured. >>>> Compiling source in /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3 ... > * python3_8: running distutils-r1_run_phase distutils-r1_python_compile >python3.8 setup.py build -j 24 >running build >running build_py >creating /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave >copying pweave/scripts.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave >copying pweave/readers.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave >copying pweave/config.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave >copying pweave/mimetypes.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave >copying pweave/__init__.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave >copying pweave/pweb.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave >creating /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/themes >copying pweave/themes/journal.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/themes >copying pweave/themes/cerulean.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/themes >copying pweave/themes/bootstrap.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/themes >copying pweave/themes/skeleton.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/themes >copying pweave/themes/__init__.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/themes >creating /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/formatters >copying pweave/formatters/jupyter_notebook.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/formatters >copying pweave/formatters/rst.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/formatters >copying pweave/formatters/markdownmath.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/formatters >copying pweave/formatters/base.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/formatters >copying pweave/formatters/publish.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/formatters >copying pweave/formatters/templates.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/formatters >copying pweave/formatters/markdown.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/formatters >copying pweave/formatters/tex.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/formatters >copying pweave/formatters/__init__.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/formatters >creating /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/processors >copying pweave/processors/jupyter.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/processors >copying pweave/processors/base.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/processors >copying pweave/processors/subsnippets.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/processors >copying pweave/processors/__init__.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/processors >creating /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/bokeh >copying pweave/bokeh/__init__.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_8/lib/pweave/bokeh >warning: build_py: byte-compiling is disabled, skipping. > > * python3_9: running distutils-r1_run_phase distutils-r1_python_compile >python3.9 setup.py build -j 24 >running build >running build_py >creating /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave >copying pweave/scripts.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave >copying pweave/readers.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave >copying pweave/config.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave >copying pweave/mimetypes.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave >copying pweave/__init__.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave >copying pweave/pweb.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave >creating /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/themes >copying pweave/themes/journal.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/themes >copying pweave/themes/cerulean.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/themes >copying pweave/themes/bootstrap.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/themes >copying pweave/themes/skeleton.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/themes >copying pweave/themes/__init__.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/themes >creating /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/formatters >copying pweave/formatters/jupyter_notebook.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/formatters >copying pweave/formatters/rst.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/formatters >copying pweave/formatters/markdownmath.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/formatters >copying pweave/formatters/base.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/formatters >copying pweave/formatters/publish.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/formatters >copying pweave/formatters/templates.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/formatters >copying pweave/formatters/markdown.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/formatters >copying pweave/formatters/tex.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/formatters >copying pweave/formatters/__init__.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/formatters >creating /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/processors >copying pweave/processors/jupyter.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/processors >copying pweave/processors/base.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/processors >copying pweave/processors/subsnippets.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/processors >copying pweave/processors/__init__.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/processors >creating /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/bokeh >copying pweave/bokeh/__init__.py -> /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3-python3_9/lib/pweave/bokeh >warning: build_py: byte-compiling is disabled, skipping. > > * Using python3.10 in global scope > * python3_10: running distutils-r1_run_phase python_compile_all >>>> Source compiled. >>>> Test phase: dev-python/pweave-0.30.3-r1 > * python3_8: running distutils-r1_run_phase python_test >python3.8 -m pytest -vv -ra -l -Wdefault >============================= test session starts ============================== >platform linux -- Python 3.8.11, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3.8 >cachedir: .pytest_cache >rootdir: /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3 >collecting ... collected 10 items > >tests/test_cache.py::test_cache PASSED [ 10%] >tests/test_pweave.py::WeaveTest::testClassInMultipleChunksUsingContinueOption FAILED [ 20%] >tests/test_pweave.py::WeaveTest::testFIR_FilterExampleTex FAILED [ 30%] >tests/test_pweave.py::WeaveTest::testInlineCode PASSED [ 40%] >tests/test_pweave.py::WeaveTest::testSimple FAILED [ 50%] >tests/test_pweave.py::WeaveTest::testWrapAndCodeOutput PASSED [ 60%] >tests/test_pweave.py::ConvertTest::testConvert PASSED [ 70%] >tests/test_pweave.py::ConvertTest::testNbformat PASSED [ 80%] >tests/test_readers.py::test_markdown PASSED [ 90%] >tests/test_readers.py::test_script PASSED [100%] > >=================================== FAILURES =================================== >____________ WeaveTest.testClassInMultipleChunksUsingContinueOption ____________ > >self = <tests.test_pweave.WeaveTest testMethod=testClassInMultipleChunksUsingContinueOption> >reference = None > > def assertSameAsReference(self, reference=None): > try: >> self.assertEqual(self.contentOf(reference if reference is not None else self.REFERENCE), > self.contentOf(self.OUTFILE)) > >reference = None >self = <tests.test_pweave.WeaveTest testMethod=testClassInMultipleChunksUsingContinueOption> > >tests/_frameworkForTests.py:34: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <tests.test_pweave.WeaveTest testMethod=testClassInMultipleChunksUsingContinueOption> >first = '% AR model using Yule-Walker method\n% Matti Pastell\n% 14.5.2013\n\n\n```python\nfrom scipy import signal, linalg\ni...747881, -0.06257484,\n-0.12929761])\n```\n\n\n```python\nar1.spectrum()\n```\n\n![](figures/ar_yw_figure5_1.png)\\\n\n' >second = '% AR model using Yule-Walker method\n% Matti Pastell\n% 14.5.2013\n\n\n```python\nfrom scipy import signal, linalg\ni...ray([ 1.19379795, -0.21810471, -0.12747881, -0.06257484,\n-0.12929761])\n```\n\n\n```python\nar1.spectrum()\n```\n\n\n' >msg = None > > def assertEqual(self, first, second, msg=None): > """Fail if the two objects are unequal as determined by the '==' > operator. > """ > assertion_func = self._getAssertEqualityFunc(first, second) >> assertion_func(first, second, msg=msg) > >assertion_func = <bound method TestCase.assertMultiLineEqual of <tests.test_pweave.WeaveTest testMethod=testClassInMultipleChunksUsingContinueOption>> >first = ('% AR model using Yule-Walker method\n' > '% Matti Pastell\n' > '% 14.5.2013\n' > '\n' > '\n' > '```python\n' > 'from scipy import signal, linalg\n' > 'import numpy as np\n' > 'import matplotlib.pyplot as plt\n' > '\n' > 'class YW(object):\n' > ' """A class to fit AR model using Yule-Walker method"""\n' > ' \n' > ' def __init__(self, X):\n' > ' self.X = X - np.mean(X)\n' > '```\n' > '\n' > '\n' > ' \n' > '# Calculate autocorrelation\n' > '\n' > 'YW method requires that we compute the sample autocorrelation function:\n' > '\n' > '$$r_k = \\frac{1}{(n-k)\\sigma^2}\\sum_{t=1}^{n-k}(X_t - \\mu)(X_{t+k} - ' > '\\mu)$$\n' > '\n' > '\n' > '```python\n' > ' def autocorr(self, lag=10):\n' > " c = np.correlate(self.X, self.X, 'full')\n" > ' mid = int(np.floor(len(c) * 0.5))\n' > ' acov = c[mid:mid+lag]\n' > ' acor = acov/acov[0]\n' > ' return(acor)\n' > '```\n' > '\n' > '\n' > '\n' > '\n' > '# Fit\n' > '\n' > 'Form the Yule-Walker equations $r = R \\Phi$ based on sample\n' > 'autocorrelation $r_k$. Notice that the matrix R is a Toeplizt matrix\n' > 'and it is thus easy to form using `toeplitz` function from `scipy.linalg`.\n' > '\n' > ' $$\\begin{pmatrix}\n' > ' r_1\\\\\n' > ' r_2\\\\\n' > ' \\vdots\\\\\n' > ' r_p\n' > ' \\end{pmatrix}\n' > ' =\n' > ' \\begin{pmatrix}\n' > ' r_0 & r_1 & \\ldots & r_{p-1} \\\\\n' > ' r_1 & r_0 & \\ldots & r_{p-2} \\\\\n' > ' \\vdots & \\vdots & \\ddots & \\vdots \\\\ \n' > ' r_{p-1} & r_{p-2} & \\ldots & r_0\n' > ' \\end{pmatrix}\n' > ' \\begin{pmatrix}\n' > ' \\phi_1\\\\\n' > ' \\phi_2\\\\\n' > ' \\vdots\\\\\n' > ' \\phi_{p}\\\\\n' > ' \\end{pmatrix}$$\n' > '\n' > 'And solve simply using: $$\\Phi = R^{-1}r$$\n' > '\n' > '\n' > '```python\n' > ' def fit(self, p=5):\n' > ' ac = self.autocorr(p+1)\n' > ' R = linalg.toeplitz(ac[:p])\n' > ' r = ac[1:p+1]\n' > ' self.phi = linalg.inv(R).dot(r)\n' > '```\n' > '\n' > '\n' > '\n' > '\n' > '# Calculate and plot the spectrum \n' > '\n' > 'The spectrum of an AR process is given by:\n' > '\n' > '$$S(f) = \\frac{\\sigma^2}{|1 - \\sum_{k=1}^{p} \\phi_k e^{-2\\pi ikf}|^2} ' > '$$\n' > '\n' > 'It can be calcuted easily using `scipy.signal.freqz`.\n' > ' \n' > '\n' > '```python\n' > ' def spectrum(self):\n' > ' a = np.concatenate([np.ones(1), -self.phi])\n' > ' w, h = signal.freqz(1, a)\n' > ' h_db = 10*np.log10(2*(np.abs(h)/len(h)))\n' > ' plt.plot(w/np.pi, h_db)\n' > " plt.xlabel(r'Normalized Frequency ($\\times \\pi$rad/sample)')\n" > " plt.ylabel(r'Power/frequency (dB/rad/sample)')\n" > " plt.title(r'Yule-Walker Spectral Density Estimate')\n" > '```\n' > '\n' > '\n' > '\n' > '\n' > '# Try it out:\n' > '\n' > '\n' > '```python\n' > 'x = np.sin(np.linspace(0, 20))\n' > 'ar1 = YW(x)\n' > 'ar1.fit()\n' > 'ar1.phi\n' > '```\n' > '\n' > '```\n' > 'array([ 1.19379795, -0.21810471, -0.12747881, -0.06257484,\n' > '-0.12929761])\n' > '```\n' > '\n' > '\n' > '```python\n' > 'ar1.spectrum()\n' > '```\n' > '\n' > '![](figures/ar_yw_figure5_1.png)\\\n' > '\n') >msg = None >second = ('% AR model using Yule-Walker method\n' > '% Matti Pastell\n' > '% 14.5.2013\n' > '\n' > '\n' > '```python\n' > 'from scipy import signal, linalg\n' > 'import numpy as np\n' > 'import matplotlib.pyplot as plt\n' > '\n' > 'class YW(object):\n' > ' """A class to fit AR model using Yule-Walker method"""\n' > ' \n' > ' def __init__(self, X):\n' > ' self.X = X - np.mean(X)\n' > '```\n' > '\n' > '\n' > ' \n' > '# Calculate autocorrelation\n' > '\n' > 'YW method requires that we compute the sample autocorrelation function:\n' > '\n' > '$$r_k = \\frac{1}{(n-k)\\sigma^2}\\sum_{t=1}^{n-k}(X_t - \\mu)(X_{t+k} - ' > '\\mu)$$\n' > '\n' > '\n' > '```python\n' > ' def autocorr(self, lag=10):\n' > " c = np.correlate(self.X, self.X, 'full')\n" > ' mid = int(np.floor(len(c) * 0.5))\n' > ' acov = c[mid:mid+lag]\n' > ' acor = acov/acov[0]\n' > ' return(acor)\n' > '```\n' > '\n' > '\n' > '\n' > '\n' > '# Fit\n' > '\n' > 'Form the Yule-Walker equations $r = R \\Phi$ based on sample\n' > 'autocorrelation $r_k$. Notice that the matrix R is a Toeplizt matrix\n' > 'and it is thus easy to form using `toeplitz` function from `scipy.linalg`.\n' > '\n' > ' $$\\begin{pmatrix}\n' > ' r_1\\\\\n' > ' r_2\\\\\n' > ' \\vdots\\\\\n' > ' r_p\n' > ' \\end{pmatrix}\n' > ' =\n' > ' \\begin{pmatrix}\n' > ' r_0 & r_1 & \\ldots & r_{p-1} \\\\\n' > ' r_1 & r_0 & \\ldots & r_{p-2} \\\\\n' > ' \\vdots & \\vdots & \\ddots & \\vdots \\\\ \n' > ' r_{p-1} & r_{p-2} & \\ldots & r_0\n' > ' \\end{pmatrix}\n' > ' \\begin{pmatrix}\n' > ' \\phi_1\\\\\n' > ' \\phi_2\\\\\n' > ' \\vdots\\\\\n' > ' \\phi_{p}\\\\\n' > ' \\end{pmatrix}$$\n' > '\n' > 'And solve simply using: $$\\Phi = R^{-1}r$$\n' > '\n' > '\n' > '```python\n' > ' def fit(self, p=5):\n' > ' ac = self.autocorr(p+1)\n' > ' R = linalg.toeplitz(ac[:p])\n' > ' r = ac[1:p+1]\n' > ' self.phi = linalg.inv(R).dot(r)\n' > '```\n' > '\n' > '\n' > '\n' > '\n' > '# Calculate and plot the spectrum \n' > '\n' > 'The spectrum of an AR process is given by:\n' > '\n' > '$$S(f) = \\frac{\\sigma^2}{|1 - \\sum_{k=1}^{p} \\phi_k e^{-2\\pi ikf}|^2} ' > '$$\n' > '\n' > 'It can be calcuted easily using `scipy.signal.freqz`.\n' > ' \n' > '\n' > '```python\n' > ' def spectrum(self):\n' > ' a = np.concatenate([np.ones(1), -self.phi])\n' > ' w, h = signal.freqz(1, a)\n' > ' h_db = 10*np.log10(2*(np.abs(h)/len(h)))\n' > ' plt.plot(w/np.pi, h_db)\n' > " plt.xlabel(r'Normalized Frequency ($\\times \\pi$rad/sample)')\n" > " plt.ylabel(r'Power/frequency (dB/rad/sample)')\n" > " plt.title(r'Yule-Walker Spectral Density Estimate')\n" > '```\n' > '\n' > '\n' > '\n' > '\n' > '# Try it out:\n' > '\n' > '\n' > '```python\n' > 'x = np.sin(np.linspace(0, 20))\n' > 'ar1 = YW(x)\n' > 'ar1.fit()\n' > 'ar1.phi\n' > '```\n' > '\n' > '```\n' > 'array([ 1.19379795, -0.21810471, -0.12747881, -0.06257484,\n' > '-0.12929761])\n' > '```\n' > '\n' > '\n' > '```python\n' > 'ar1.spectrum()\n' > '```\n' > '\n' > '\n') >self = <tests.test_pweave.WeaveTest testMethod=testClassInMultipleChunksUsingContinueOption> > >/usr/lib/python3.8/unittest/case.py:912: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <tests.test_pweave.WeaveTest testMethod=testClassInMultipleChunksUsingContinueOption> >first = '% AR model using Yule-Walker method\n% Matti Pastell\n% 14.5.2013\n\n\n```python\nfrom scipy import signal, linalg\ni...747881, -0.06257484,\n-0.12929761])\n```\n\n\n```python\nar1.spectrum()\n```\n\n![](figures/ar_yw_figure5_1.png)\\\n\n' >second = '% AR model using Yule-Walker method\n% Matti Pastell\n% 14.5.2013\n\n\n```python\nfrom scipy import signal, linalg\ni...ray([ 1.19379795, -0.21810471, -0.12747881, -0.06257484,\n-0.12929761])\n```\n\n\n```python\nar1.spectrum()\n```\n\n\n' >msg = None > > def assertMultiLineEqual(self, first, second, msg=None): > """Assert that two multi-line strings are equal.""" > self.assertIsInstance(first, str, 'First argument is not a string') > self.assertIsInstance(second, str, 'Second argument is not a string') > > if first != second: > # don't use difflib if the strings are too long > if (len(first) > self._diffThreshold or > len(second) > self._diffThreshold): > self._baseAssertEqual(first, second, msg) > firstlines = first.splitlines(keepends=True) > secondlines = second.splitlines(keepends=True) > if len(firstlines) == 1 and first.strip('\r\n') == first: > firstlines = [first + '\n'] > secondlines = [second + '\n'] > standardMsg = '%s != %s' % _common_shorten_repr(first, second) > diff = '\n' + ''.join(difflib.ndiff(firstlines, secondlines)) > standardMsg = self._truncateMessage(standardMsg, diff) >> self.fail(self._formatMessage(msg, standardMsg)) > >diff = ('\n' > ' % AR model using Yule-Walker method\n' > ' % Matti Pastell\n' > ' % 14.5.2013\n' > ' \n' > ' \n' > ' ```python\n' > ' from scipy import signal, linalg\n' > ' import numpy as np\n' > ' import matplotlib.pyplot as plt\n' > ' \n' > ' class YW(object):\n' > ' """A class to fit AR model using Yule-Walker method"""\n' > ' \n' > ' def __init__(self, X):\n' > ' self.X = X - np.mean(X)\n' > ' ```\n' > ' \n' > ' \n' > ' \n' > ' # Calculate autocorrelation\n' > ' \n' > ' YW method requires that we compute the sample autocorrelation function:\n' > ' \n' > ' $$r_k = \\frac{1}{(n-k)\\sigma^2}\\sum_{t=1}^{n-k}(X_t - \\mu)(X_{t+k} - ' > '\\mu)$$\n' > ' \n' > ' \n' > ' ```python\n' > ' def autocorr(self, lag=10):\n' > " c = np.correlate(self.X, self.X, 'full')\n" > ' mid = int(np.floor(len(c) * 0.5))\n' > ' acov = c[mid:mid+lag]\n' > ' acor = acov/acov[0]\n' > ' return(acor)\n' > ' ```\n' > ' \n' > ' \n' > ' \n' > ' \n' > ' # Fit\n' > ' \n' > ' Form the Yule-Walker equations $r = R \\Phi$ based on sample\n' > ' autocorrelation $r_k$. Notice that the matrix R is a Toeplizt matrix\n' > ' and it is thus easy to form using `toeplitz` function from ' > '`scipy.linalg`.\n' > ' \n' > ' $$\\begin{pmatrix}\n' > ' r_1\\\\\n' > ' r_2\\\\\n' > ' \\vdots\\\\\n' > ' r_p\n' > ' \\end{pmatrix}\n' > ' =\n' > ' \\begin{pmatrix}\n' > ' r_0 & r_1 & \\ldots & r_{p-1} \\\\\n' > ' r_1 & r_0 & \\ldots & r_{p-2} \\\\\n' > ' \\vdots & \\vdots & \\ddots & \\vdots \\\\ \n' > ' r_{p-1} & r_{p-2} & \\ldots & r_0\n' > ' \\end{pmatrix}\n' > ' \\begin{pmatrix}\n' > ' \\phi_1\\\\\n' > ' \\phi_2\\\\\n' > ' \\vdots\\\\\n' > ' \\phi_{p}\\\\\n' > ' \\end{pmatrix}$$\n' > ' \n' > ' And solve simply using: $$\\Phi = R^{-1}r$$\n' > ' \n' > ' \n' > ' ```python\n' > ' def fit(self, p=5):\n' > ' ac = self.autocorr(p+1)\n' > ' R = linalg.toeplitz(ac[:p])\n' > ' r = ac[1:p+1]\n' > ' self.phi = linalg.inv(R).dot(r)\n' > ' ```\n' > ' \n' > ' \n' > ' \n' > ' \n' > ' # Calculate and plot the spectrum \n' > ' \n' > ' The spectrum of an AR process is given by:\n' > ' \n' > ' $$S(f) = \\frac{\\sigma^2}{|1 - \\sum_{k=1}^{p} \\phi_k e^{-2\\pi ikf}|^2} ' > '$$\n' > ' \n' > ' It can be calcuted easily using `scipy.signal.freqz`.\n' > ' \n' > ' \n' > ' ```python\n' > ' def spectrum(self):\n' > ' a = np.concatenate([np.ones(1), -self.phi])\n' > ' w, h = signal.freqz(1, a)\n' > ' h_db = 10*np.log10(2*(np.abs(h)/len(h)))\n' > ' plt.plot(w/np.pi, h_db)\n' > " plt.xlabel(r'Normalized Frequency ($\\times \\pi$rad/sample)')\n" > " plt.ylabel(r'Power/frequency (dB/rad/sample)')\n" > " plt.title(r'Yule-Walker Spectral Density Estimate')\n" > ' ```\n' > ' \n' > ' \n' > ' \n' > ' \n' > ' # Try it out:\n' > ' \n' > ' \n' > ' ```python\n' > ' x = np.sin(np.linspace(0, 20))\n' > ' ar1 = YW(x)\n' > ' ar1.fit()\n' > ' ar1.phi\n' > ' ```\n' > ' \n' > ' ```\n' > ' array([ 1.19379795, -0.21810471, -0.12747881, -0.06257484,\n' > ' -0.12929761])\n' > ' ```\n' > ' \n' > ' \n' > ' ```python\n' > ' ar1.spectrum()\n' > ' ```\n' > ' \n' > '- ![](figures/ar_yw_figure5_1.png)\\\n' > ' \n') >first = ('% AR model using Yule-Walker method\n' > '% Matti Pastell\n' > '% 14.5.2013\n' > '\n' > '\n' > '```python\n' > 'from scipy import signal, linalg\n' > 'import numpy as np\n' > 'import matplotlib.pyplot as plt\n' > '\n' > 'class YW(object):\n' > ' """A class to fit AR model using Yule-Walker method"""\n' > ' \n' > ' def __init__(self, X):\n' > ' self.X = X - np.mean(X)\n' > '```\n' > '\n' > '\n' > ' \n' > '# Calculate autocorrelation\n' > '\n' > 'YW method requires that we compute the sample autocorrelation function:\n' > '\n' > '$$r_k = \\frac{1}{(n-k)\\sigma^2}\\sum_{t=1}^{n-k}(X_t - \\mu)(X_{t+k} - ' > '\\mu)$$\n' > '\n' > '\n' > '```python\n' > ' def autocorr(self, lag=10):\n' > " c = np.correlate(self.X, self.X, 'full')\n" > ' mid = int(np.floor(len(c) * 0.5))\n' > ' acov = c[mid:mid+lag]\n' > ' acor = acov/acov[0]\n' > ' return(acor)\n' > '```\n' > '\n' > '\n' > '\n' > '\n' > '# Fit\n' > '\n' > 'Form the Yule-Walker equations $r = R \\Phi$ based on sample\n' > 'autocorrelation $r_k$. Notice that the matrix R is a Toeplizt matrix\n' > 'and it is thus easy to form using `toeplitz` function from `scipy.linalg`.\n' > '\n' > ' $$\\begin{pmatrix}\n' > ' r_1\\\\\n' > ' r_2\\\\\n' > ' \\vdots\\\\\n' > ' r_p\n' > ' \\end{pmatrix}\n' > ' =\n' > ' \\begin{pmatrix}\n' > ' r_0 & r_1 & \\ldots & r_{p-1} \\\\\n' > ' r_1 & r_0 & \\ldots & r_{p-2} \\\\\n' > ' \\vdots & \\vdots & \\ddots & \\vdots \\\\ \n' > ' r_{p-1} & r_{p-2} & \\ldots & r_0\n' > ' \\end{pmatrix}\n' > ' \\begin{pmatrix}\n' > ' \\phi_1\\\\\n' > ' \\phi_2\\\\\n' > ' \\vdots\\\\\n' > ' \\phi_{p}\\\\\n' > ' \\end{pmatrix}$$\n' > '\n' > 'And solve simply using: $$\\Phi = R^{-1}r$$\n' > '\n' > '\n' > '```python\n' > ' def fit(self, p=5):\n' > ' ac = self.autocorr(p+1)\n' > ' R = linalg.toeplitz(ac[:p])\n' > ' r = ac[1:p+1]\n' > ' self.phi = linalg.inv(R).dot(r)\n' > '```\n' > '\n' > '\n' > '\n' > '\n' > '# Calculate and plot the spectrum \n' > '\n' > 'The spectrum of an AR process is given by:\n' > '\n' > '$$S(f) = \\frac{\\sigma^2}{|1 - \\sum_{k=1}^{p} \\phi_k e^{-2\\pi ikf}|^2} ' > '$$\n' > '\n' > 'It can be calcuted easily using `scipy.signal.freqz`.\n' > ' \n' > '\n' > '```python\n' > ' def spectrum(self):\n' > ' a = np.concatenate([np.ones(1), -self.phi])\n' > ' w, h = signal.freqz(1, a)\n' > ' h_db = 10*np.log10(2*(np.abs(h)/len(h)))\n' > ' plt.plot(w/np.pi, h_db)\n' > " plt.xlabel(r'Normalized Frequency ($\\times \\pi$rad/sample)')\n" > " plt.ylabel(r'Power/frequency (dB/rad/sample)')\n" > " plt.title(r'Yule-Walker Spectral Density Estimate')\n" > '```\n' > '\n' > '\n' > '\n' > '\n' > '# Try it out:\n' > '\n' > '\n' > '```python\n' > 'x = np.sin(np.linspace(0, 20))\n' > 'ar1 = YW(x)\n' > 'ar1.fit()\n' > 'ar1.phi\n' > '```\n' > '\n' > '```\n' > 'array([ 1.19379795, -0.21810471, -0.12747881, -0.06257484,\n' > '-0.12929761])\n' > '```\n' > '\n' > '\n' > '```python\n' > 'ar1.spectrum()\n' > '```\n' > '\n' > '![](figures/ar_yw_figure5_1.png)\\\n' > '\n') >firstlines = ['% AR model using Yule-Walker method\n', > '% Matti Pastell\n', > '% 14.5.2013\n', > '\n', > '\n', > '```python\n', > 'from scipy import signal, linalg\n', > 'import numpy as np\n', > 'import matplotlib.pyplot as plt\n', > '\n', > 'class YW(object):\n', > ' """A class to fit AR model using Yule-Walker method"""\n', > ' \n', > ' def __init__(self, X):\n', > ' self.X = X - np.mean(X)\n', > '```\n', > '\n', > '\n', > ' \n', > '# Calculate autocorrelation\n', > '\n', > 'YW method requires that we compute the sample autocorrelation function:\n', > '\n', > '$$r_k = \\frac{1}{(n-k)\\sigma^2}\\sum_{t=1}^{n-k}(X_t - \\mu)(X_{t+k} - ' > '\\mu)$$\n', > '\n', > '\n', > '```python\n', > ' def autocorr(self, lag=10):\n', > " c = np.correlate(self.X, self.X, 'full')\n", > ' mid = int(np.floor(len(c) * 0.5))\n', > ' acov = c[mid:mid+lag]\n', > ' acor = acov/acov[0]\n', > ' return(acor)\n', > '```\n', > '\n', > '\n', > '\n', > '\n', > '# Fit\n', > '\n', > 'Form the Yule-Walker equations $r = R \\Phi$ based on sample\n', > 'autocorrelation $r_k$. Notice that the matrix R is a Toeplizt matrix\n', > 'and it is thus easy to form using `toeplitz` function from `scipy.linalg`.\n', > '\n', > ' $$\\begin{pmatrix}\n', > ' r_1\\\\\n', > ' r_2\\\\\n', > ' \\vdots\\\\\n', > ' r_p\n', > ' \\end{pmatrix}\n', > ' =\n', > ' \\begin{pmatrix}\n', > ' r_0 & r_1 & \\ldots & r_{p-1} \\\\\n', > ' r_1 & r_0 & \\ldots & r_{p-2} \\\\\n', > ' \\vdots & \\vdots & \\ddots & \\vdots \\\\ \n', > ' r_{p-1} & r_{p-2} & \\ldots & r_0\n', > ' \\end{pmatrix}\n', > ' \\begin{pmatrix}\n', > ' \\phi_1\\\\\n', > ' \\phi_2\\\\\n', > ' \\vdots\\\\\n', > ' \\phi_{p}\\\\\n', > ' \\end{pmatrix}$$\n', > '\n', > 'And solve simply using: $$\\Phi = R^{-1}r$$\n', > '\n', > '\n', > '```python\n', > ' def fit(self, p=5):\n', > ' ac = self.autocorr(p+1)\n', > ' R = linalg.toeplitz(ac[:p])\n', > ' r = ac[1:p+1]\n', > ' self.phi = linalg.inv(R).dot(r)\n', > '```\n', > '\n', > '\n', > '\n', > '\n', > '# Calculate and plot the spectrum \n', > '\n', > 'The spectrum of an AR process is given by:\n', > '\n', > '$$S(f) = \\frac{\\sigma^2}{|1 - \\sum_{k=1}^{p} \\phi_k e^{-2\\pi ikf}|^2} ' > '$$\n', > '\n', > 'It can be calcuted easily using `scipy.signal.freqz`.\n', > ' \n', > '\n', > '```python\n', > ' def spectrum(self):\n', > ' a = np.concatenate([np.ones(1), -self.phi])\n', > ' w, h = signal.freqz(1, a)\n', > ' h_db = 10*np.log10(2*(np.abs(h)/len(h)))\n', > ' plt.plot(w/np.pi, h_db)\n', > " plt.xlabel(r'Normalized Frequency ($\\times \\pi$rad/sample)')\n", > " plt.ylabel(r'Power/frequency (dB/rad/sample)')\n", > " plt.title(r'Yule-Walker Spectral Density Estimate')\n", > '```\n', > '\n', > '\n', > '\n', > '\n', > '# Try it out:\n', > '\n', > '\n', > '```python\n', > 'x = np.sin(np.linspace(0, 20))\n', > 'ar1 = YW(x)\n', > 'ar1.fit()\n', > 'ar1.phi\n', > '```\n', > '\n', > '```\n', > 'array([ 1.19379795, -0.21810471, -0.12747881, -0.06257484,\n', > '-0.12929761])\n', > '```\n', > '\n', > '\n', > '```python\n', > 'ar1.spectrum()\n', > '```\n', > '\n', > '![](figures/ar_yw_figure5_1.png)\\\n', > '\n'] >msg = None >second = ('% AR model using Yule-Walker method\n' > '% Matti Pastell\n' > '% 14.5.2013\n' > '\n' > '\n' > '```python\n' > 'from scipy import signal, linalg\n' > 'import numpy as np\n' > 'import matplotlib.pyplot as plt\n' > '\n' > 'class YW(object):\n' > ' """A class to fit AR model using Yule-Walker method"""\n' > ' \n' > ' def __init__(self, X):\n' > ' self.X = X - np.mean(X)\n' > '```\n' > '\n' > '\n' > ' \n' > '# Calculate autocorrelation\n' > '\n' > 'YW method requires that we compute the sample autocorrelation function:\n' > '\n' > '$$r_k = \\frac{1}{(n-k)\\sigma^2}\\sum_{t=1}^{n-k}(X_t - \\mu)(X_{t+k} - ' > '\\mu)$$\n' > '\n' > '\n' > '```python\n' > ' def autocorr(self, lag=10):\n' > " c = np.correlate(self.X, self.X, 'full')\n" > ' mid = int(np.floor(len(c) * 0.5))\n' > ' acov = c[mid:mid+lag]\n' > ' acor = acov/acov[0]\n' > ' return(acor)\n' > '```\n' > '\n' > '\n' > '\n' > '\n' > '# Fit\n' > '\n' > 'Form the Yule-Walker equations $r = R \\Phi$ based on sample\n' > 'autocorrelation $r_k$. Notice that the matrix R is a Toeplizt matrix\n' > 'and it is thus easy to form using `toeplitz` function from `scipy.linalg`.\n' > '\n' > ' $$\\begin{pmatrix}\n' > ' r_1\\\\\n' > ' r_2\\\\\n' > ' \\vdots\\\\\n' > ' r_p\n' > ' \\end{pmatrix}\n' > ' =\n' > ' \\begin{pmatrix}\n' > ' r_0 & r_1 & \\ldots & r_{p-1} \\\\\n' > ' r_1 & r_0 & \\ldots & r_{p-2} \\\\\n' > ' \\vdots & \\vdots & \\ddots & \\vdots \\\\ \n' > ' r_{p-1} & r_{p-2} & \\ldots & r_0\n' > ' \\end{pmatrix}\n' > ' \\begin{pmatrix}\n' > ' \\phi_1\\\\\n' > ' \\phi_2\\\\\n' > ' \\vdots\\\\\n' > ' \\phi_{p}\\\\\n' > ' \\end{pmatrix}$$\n' > '\n' > 'And solve simply using: $$\\Phi = R^{-1}r$$\n' > '\n' > '\n' > '```python\n' > ' def fit(self, p=5):\n' > ' ac = self.autocorr(p+1)\n' > ' R = linalg.toeplitz(ac[:p])\n' > ' r = ac[1:p+1]\n' > ' self.phi = linalg.inv(R).dot(r)\n' > '```\n' > '\n' > '\n' > '\n' > '\n' > '# Calculate and plot the spectrum \n' > '\n' > 'The spectrum of an AR process is given by:\n' > '\n' > '$$S(f) = \\frac{\\sigma^2}{|1 - \\sum_{k=1}^{p} \\phi_k e^{-2\\pi ikf}|^2} ' > '$$\n' > '\n' > 'It can be calcuted easily using `scipy.signal.freqz`.\n' > ' \n' > '\n' > '```python\n' > ' def spectrum(self):\n' > ' a = np.concatenate([np.ones(1), -self.phi])\n' > ' w, h = signal.freqz(1, a)\n' > ' h_db = 10*np.log10(2*(np.abs(h)/len(h)))\n' > ' plt.plot(w/np.pi, h_db)\n' > " plt.xlabel(r'Normalized Frequency ($\\times \\pi$rad/sample)')\n" > " plt.ylabel(r'Power/frequency (dB/rad/sample)')\n" > " plt.title(r'Yule-Walker Spectral Density Estimate')\n" > '```\n' > '\n' > '\n' > '\n' > '\n' > '# Try it out:\n' > '\n' > '\n' > '```python\n' > 'x = np.sin(np.linspace(0, 20))\n' > 'ar1 = YW(x)\n' > 'ar1.fit()\n' > 'ar1.phi\n' > '```\n' > '\n' > '```\n' > 'array([ 1.19379795, -0.21810471, -0.12747881, -0.06257484,\n' > '-0.12929761])\n' > '```\n' > '\n' > '\n' > '```python\n' > 'ar1.spectrum()\n' > '```\n' > '\n' > '\n') >secondlines = ['% AR model using Yule-Walker method\n', > '% Matti Pastell\n', > '% 14.5.2013\n', > '\n', > '\n', > '```python\n', > 'from scipy import signal, linalg\n', > 'import numpy as np\n', > 'import matplotlib.pyplot as plt\n', > '\n', > 'class YW(object):\n', > ' """A class to fit AR model using Yule-Walker method"""\n', > ' \n', > ' def __init__(self, X):\n', > ' self.X = X - np.mean(X)\n', > '```\n', > '\n', > '\n', > ' \n', > '# Calculate autocorrelation\n', > '\n', > 'YW method requires that we compute the sample autocorrelation function:\n', > '\n', > '$$r_k = \\frac{1}{(n-k)\\sigma^2}\\sum_{t=1}^{n-k}(X_t - \\mu)(X_{t+k} - ' > '\\mu)$$\n', > '\n', > '\n', > '```python\n', > ' def autocorr(self, lag=10):\n', > " c = np.correlate(self.X, self.X, 'full')\n", > ' mid = int(np.floor(len(c) * 0.5))\n', > ' acov = c[mid:mid+lag]\n', > ' acor = acov/acov[0]\n', > ' return(acor)\n', > '```\n', > '\n', > '\n', > '\n', > '\n', > '# Fit\n', > '\n', > 'Form the Yule-Walker equations $r = R \\Phi$ based on sample\n', > 'autocorrelation $r_k$. Notice that the matrix R is a Toeplizt matrix\n', > 'and it is thus easy to form using `toeplitz` function from `scipy.linalg`.\n', > '\n', > ' $$\\begin{pmatrix}\n', > ' r_1\\\\\n', > ' r_2\\\\\n', > ' \\vdots\\\\\n', > ' r_p\n', > ' \\end{pmatrix}\n', > ' =\n', > ' \\begin{pmatrix}\n', > ' r_0 & r_1 & \\ldots & r_{p-1} \\\\\n', > ' r_1 & r_0 & \\ldots & r_{p-2} \\\\\n', > ' \\vdots & \\vdots & \\ddots & \\vdots \\\\ \n', > ' r_{p-1} & r_{p-2} & \\ldots & r_0\n', > ' \\end{pmatrix}\n', > ' \\begin{pmatrix}\n', > ' \\phi_1\\\\\n', > ' \\phi_2\\\\\n', > ' \\vdots\\\\\n', > ' \\phi_{p}\\\\\n', > ' \\end{pmatrix}$$\n', > '\n', > 'And solve simply using: $$\\Phi = R^{-1}r$$\n', > '\n', > '\n', > '```python\n', > ' def fit(self, p=5):\n', > ' ac = self.autocorr(p+1)\n', > ' R = linalg.toeplitz(ac[:p])\n', > ' r = ac[1:p+1]\n', > ' self.phi = linalg.inv(R).dot(r)\n', > '```\n', > '\n', > '\n', > '\n', > '\n', > '# Calculate and plot the spectrum \n', > '\n', > 'The spectrum of an AR process is given by:\n', > '\n', > '$$S(f) = \\frac{\\sigma^2}{|1 - \\sum_{k=1}^{p} \\phi_k e^{-2\\pi ikf}|^2} ' > '$$\n', > '\n', > 'It can be calcuted easily using `scipy.signal.freqz`.\n', > ' \n', > '\n', > '```python\n', > ' def spectrum(self):\n', > ' a = np.concatenate([np.ones(1), -self.phi])\n', > ' w, h = signal.freqz(1, a)\n', > ' h_db = 10*np.log10(2*(np.abs(h)/len(h)))\n', > ' plt.plot(w/np.pi, h_db)\n', > " plt.xlabel(r'Normalized Frequency ($\\times \\pi$rad/sample)')\n", > " plt.ylabel(r'Power/frequency (dB/rad/sample)')\n", > " plt.title(r'Yule-Walker Spectral Density Estimate')\n", > '```\n', > '\n', > '\n', > '\n', > '\n', > '# Try it out:\n', > '\n', > '\n', > '```python\n', > 'x = np.sin(np.linspace(0, 20))\n', > 'ar1 = YW(x)\n', > 'ar1.fit()\n', > 'ar1.phi\n', > '```\n', > '\n', > '```\n', > 'array([ 1.19379795, -0.21810471, -0.12747881, -0.06257484,\n', > '-0.12929761])\n', > '```\n', > '\n', > '\n', > '```python\n', > 'ar1.spectrum()\n', > '```\n', > '\n', > '\n'] >self = <tests.test_pweave.WeaveTest testMethod=testClassInMultipleChunksUsingContinueOption> >standardMsg = ("'% AR[2504 " > "chars]nar1.spectrum()\\n```\\n\\n![](figures/ar_yw_figure5_1.png)\\\\\\n\\n' " > "!= '% AR[2504 chars]nar1.spectrum()\\n```\\n\\n\\n'\n" > 'Diff is 2633 characters long. Set self.maxDiff to None to see it.') > >/usr/lib/python3.8/unittest/case.py:1292: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <tests.test_pweave.WeaveTest testMethod=testClassInMultipleChunksUsingContinueOption> >msg = "'% AR[2504 chars]nar1.spectrum()\\n```\\n\\n![](figures/ar_yw_figure5_1.png)\\\\\\n\\n' != '% AR[2504 chars]nar1.spectrum()\\n```\\n\\n\\n'\nDiff is 2633 characters long. Set self.maxDiff to None to see it." > > def fail(self, msg=None): > """Fail immediately, with the given message.""" >> raise self.failureException(msg) >E AssertionError: '% AR[2504 chars]nar1.spectrum()\n```\n\n![](figures/ar_yw_figure5_1.png)\\\n\n' != '% AR[2504 chars]nar1.spectrum()\n```\n\n\n' >E Diff is 2633 characters long. Set self.maxDiff to None to see it. > >msg = ("'% AR[2504 " > "chars]nar1.spectrum()\\n```\\n\\n![](figures/ar_yw_figure5_1.png)\\\\\\n\\n' " > "!= '% AR[2504 chars]nar1.spectrum()\\n```\\n\\n\\n'\n" > 'Diff is 2633 characters long. Set self.maxDiff to None to see it.') >self = <tests.test_pweave.WeaveTest testMethod=testClassInMultipleChunksUsingContinueOption> > >/usr/lib/python3.8/unittest/case.py:753: AssertionError > >During handling of the above exception, another exception occurred: > >self = <tests.test_pweave.WeaveTest testMethod=testClassInMultipleChunksUsingContinueOption> > > def testMethod(self): > self.TESTDIR = os.path.join('weave', doctype) > infile = self.absPathTo(filename + 'w') > self.setNewOutfile(filename) > > pweave.weave(infile, doctype=doctype, > output=self.absPathTo(filename), > **kwargs) > > basename, _, ext = filename.rpartition('.') > self.REFERENCE = self.absPathTo(basename + '_REF.' + ext) >> self.assertSameAsReference() > >_ = '.' >basename = 'ar_yw' >doctype = 'pandoc' >ext = 'md' >filename = 'ar_yw.md' >infile = '/var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/weave/pandoc/ar_yw.mdw' >kwargs = {} >self = <tests.test_pweave.WeaveTest testMethod=testClassInMultipleChunksUsingContinueOption> > >tests/test_pweave.py:31: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <tests.test_pweave.WeaveTest testMethod=testClassInMultipleChunksUsingContinueOption> >reference = None > > def assertSameAsReference(self, reference=None): > try: > self.assertEqual(self.contentOf(reference if reference is not None else self.REFERENCE), > self.contentOf(self.OUTFILE)) > except AssertionError: >> raise AssertionError("{ref} and {out} differs\ntry:\n$ vimdiff {ref} {out}".format( > ref=self.absPathTo(self.REFERENCE), > out=self.absPathTo(self.OUTFILE))) >E AssertionError: /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/weave/pandoc/ar_yw_REF.md and /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/weave/pandoc/ar_yw.md differs >E try: >E $ vimdiff /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/weave/pandoc/ar_yw_REF.md /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/weave/pandoc/ar_yw.md > >reference = None >self = <tests.test_pweave.WeaveTest testMethod=testClassInMultipleChunksUsingContinueOption> > >tests/_frameworkForTests.py:37: AssertionError >----------------------------- Captured stdout call ----------------------------- >status >Processing chunk 1 named None from line 15 >Processing chunk 2 named None from line 30 >Processing chunk 3 named None from line 67 >Processing chunk 4 named None from line 87 >Processing chunk 5 named None from line 98 >Weaved /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/weave/pandoc/ar_yw.mdw to /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/weave/pandoc/ar_yw.md >______________________ WeaveTest.testFIR_FilterExampleTex ______________________ > >self = <tests.test_pweave.WeaveTest testMethod=testFIR_FilterExampleTex> >reference = None > > def assertSameAsReference(self, reference=None): > try: >> self.assertEqual(self.contentOf(reference if reference is not None else self.REFERENCE), > self.contentOf(self.OUTFILE)) > >reference = None >self = <tests.test_pweave.WeaveTest testMethod=testFIR_FilterExampleTex> > >tests/_frameworkForTests.py:34: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <tests.test_pweave.WeaveTest testMethod=testFIR_FilterExampleTex> >first = '\\documentclass[a4paper,11pt,final]{article}\n\\usepackage{fancyvrb, color, graphicx, hyperref, amsmath, url}\n\\usep...R_design_verb_figure4_1.pdf}\n\\caption{Bandpass FIR filter.}\n\\label{fig:None}\n\\end{figure}\n\n\n\\end{document}\n' >second = '\\documentclass[a4paper,11pt,final]{article}\n\\usepackage{fancyvrb, color, graphicx, hyperref, amsmath, url}\n\\usep...egin{figure}[htpb]\n\\center\n\\caption{Bandpass FIR filter.}\n\\label{fig:None}\n\\end{figure}\n\n\n\\end{document}\n' >msg = None > > def assertEqual(self, first, second, msg=None): > """Fail if the two objects are unequal as determined by the '==' > operator. > """ > assertion_func = self._getAssertEqualityFunc(first, second) >> assertion_func(first, second, msg=msg) > >assertion_func = <bound method TestCase.assertMultiLineEqual of <tests.test_pweave.WeaveTest testMethod=testFIR_FilterExampleTex>> >first = ('\\documentclass[a4paper,11pt,final]{article}\n' > '\\usepackage{fancyvrb, color, graphicx, hyperref, amsmath, url}\n' > '\\usepackage{palatino}\n' > '\\usepackage[a4paper,text={16.5cm,25.2cm},centering]{geometry}\n' > '\n' > '\\hypersetup\n' > '{ pdfauthor = {Matti Pastell},\n' > ' pdftitle={FIR filter design with Python and SciPy},\n' > ' colorlinks=TRUE,\n' > ' linkcolor=black,\n' > ' citecolor=blue,\n' > ' urlcolor=blue\n' > '}\n' > '\n' > '\\setlength{\\parindent}{0pt}\n' > '\\setlength{\\parskip}{1.2ex}\n' > '\n' > '\n' > '\n' > '\\title{FIR filter design with Python and SciPy}\n' > '\\author{Matti Pastell \\\\ \\url{http://mpastell.com}}\n' > '\\date{15th April 2013}\n' > '\n' > '\\begin{document}\n' > '\\maketitle\n' > '\n' > '\n' > '\\section{Introduction}\n' > '\n' > 'This an example of a document that can be published using\n' > '\\href{http://mpastell.com/pweave}{Pweave}. Text is written\n' > 'using \\LaTeX{} and code between \\texttt{<<>>} and \\texttt{@} is executed\n' > 'and results are included in the resulting document.\n' > '\n' > 'You can define various options for code chunks to control code\n' > 'execution and formatting (see\n' > '\\href{http://mpastell.com/pweave/usage.html\\#code-chunk-options}{Pweave\n' > 'docs}).\n' > '\n' > '\\section{FIR Filter Design}\n' > '\n' > "We'll implement lowpass, highpass and ' bandpass FIR filters. If you\n" > 'want to read more about DSP I highly recommend\n' > "\\href{http://www.dspguide.com/}{The Scientist and Engineer's Guide to\n" > 'Digital Signal Processing} which is freely available online.\n' > '\n' > '\\subsection{Functions for frequency, phase, impulse and step response}\n' > '\n' > "Let's first define functions to plot filter properties.\n" > '\n' > '\n' > '\n' > '\\begin{verbatim}\n' > 'from pylab import *\n' > 'import scipy.signal as signal\n' > '\n' > '#Plot frequency and phase response\n' > 'def mfreqz(b,a=1):\n' > ' w,h = signal.freqz(b,a)\n' > ' h_dB = 20 * log10 (abs(h))\n' > ' subplot(211)\n' > ' plot(w/max(w),h_dB)\n' > ' ylim(-150, 5)\n' > " ylabel('Magnitude (db)')\n" > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n" > " title(r'Frequency response')\n" > ' subplot(212)\n' > ' h_Phase = unwrap(arctan2(imag(h),real(h)))\n' > ' plot(w/max(w),h_Phase)\n' > " ylabel('Phase (radians)')\n" > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n" > " title(r'Phase response')\n" > ' subplots_adjust(hspace=0.5)\n' > '\n' > '#Plot step and impulse response\n' > 'def impz(b,a=1):\n' > ' l = len(b)\n' > ' impulse = repeat(0.,l); impulse[0] =1.\n' > ' x = arange(0,l)\n' > ' response = signal.lfilter(b,a,impulse)\n' > ' subplot(211)\n' > ' stem(x, response)\n' > " ylabel('Amplitude')\n" > " xlabel(r'n (samples)')\n" > " title(r'Impulse response')\n" > ' subplot(212)\n' > ' step = cumsum(response)\n' > ' stem(x, step)\n' > " ylabel('Amplitude')\n" > " xlabel(r'n (samples)')\n" > " title(r'Step response')\n" > ' subplots_adjust(hspace=0.5)\n' > '\\end{verbatim}\n' > '\n' > '\n' > '\\subsection{Lowpass FIR filter}\n' > '\n' > 'Designing a lowpass FIR filter is very simple to do with SciPy, all you\n' > 'need to do is to define the window length, cut off frequency and the\n' > 'window.\n' > '\n' > 'The Hamming window is defined as:\n' > '$w(n) = \\alpha - \\beta\\cos\\frac{2\\pi n}{N-1}$, where $\\alpha=0.54$ ' > 'and\n' > '$\\beta=0.46$\n' > '\n' > 'The next code chunk is executed in term mode, see the source document\n' > 'for syntax. Notice also that Pweave can now catch multiple\n' > 'figures/code chunk.\n' > '\n' > '\n' > '\\begin{verbatim}\n' > 'n = 61\n' > 'a = signal.firwin(n, cutoff = 0.3, window = "hamming")\n' > '#Frequency and phase response\n' > 'mfreqz(a)\n' > '#Impulse and step response\n' > 'p = figure(2)\n' > 'impz(a)\n' > '\\end{verbatim}\n' > '\\includegraphics[width= ' > '\\linewidth]{figures/FIR_design_verb_figure2_1.pdf}\n' > '\\includegraphics[width= ' > '\\linewidth]{figures/FIR_design_verb_figure2_2.pdf}\n' > '\n' > '\n' > '\\subsection{Highpass FIR Filter}\n' > '\n' > "Let's define a highpass FIR filter:\n" > '\n' > '\n' > '\\begin{verbatim}\n' > 'n = 101\n' > 'a = signal.firwin(n, cutoff = 0.3, window = "hanning", pass_zero=False)\n' > 'mfreqz(a)\n' > '\\end{verbatim}\n' > '\\includegraphics[width= ' > '\\linewidth]{figures/FIR_design_verb_figure3_1.pdf}\n' > '\n' > '\n' > '\\subsection{Bandpass FIR filter}\n' > '\n' > 'Notice that the plot has a caption defined in code chunk options.\n' > '\n' > '\n' > '\n' > '\\begin{verbatim}\n' > 'n = 1001\n' > "a = signal.firwin(n, cutoff = [0.2, 0.5], window = 'blackmanharris', " > 'pass_zero = False)\n' > 'mfreqz(a)\n' > '\\end{verbatim}\n' > '\\begin{figure}[htpb]\n' > '\\center\n' > '\\includegraphics[width= ' > '\\linewidth]{figures/FIR_design_verb_figure4_1.pdf}\n' > '\\caption{Bandpass FIR filter.}\n' > '\\label{fig:None}\n' > '\\end{figure}\n' > '\n' > '\n' > '\\end{document}\n') >msg = None >second = ('\\documentclass[a4paper,11pt,final]{article}\n' > '\\usepackage{fancyvrb, color, graphicx, hyperref, amsmath, url}\n' > '\\usepackage{palatino}\n' > '\\usepackage[a4paper,text={16.5cm,25.2cm},centering]{geometry}\n' > '\n' > '\\hypersetup\n' > '{ pdfauthor = {Matti Pastell},\n' > ' pdftitle={FIR filter design with Python and SciPy},\n' > ' colorlinks=TRUE,\n' > ' linkcolor=black,\n' > ' citecolor=blue,\n' > ' urlcolor=blue\n' > '}\n' > '\n' > '\\setlength{\\parindent}{0pt}\n' > '\\setlength{\\parskip}{1.2ex}\n' > '\n' > '\n' > '\n' > '\\title{FIR filter design with Python and SciPy}\n' > '\\author{Matti Pastell \\\\ \\url{http://mpastell.com}}\n' > '\\date{15th April 2013}\n' > '\n' > '\\begin{document}\n' > '\\maketitle\n' > '\n' > '\n' > '\\section{Introduction}\n' > '\n' > 'This an example of a document that can be published using\n' > '\\href{http://mpastell.com/pweave}{Pweave}. Text is written\n' > 'using \\LaTeX{} and code between \\texttt{<<>>} and \\texttt{@} is executed\n' > 'and results are included in the resulting document.\n' > '\n' > 'You can define various options for code chunks to control code\n' > 'execution and formatting (see\n' > '\\href{http://mpastell.com/pweave/usage.html\\#code-chunk-options}{Pweave\n' > 'docs}).\n' > '\n' > '\\section{FIR Filter Design}\n' > '\n' > "We'll implement lowpass, highpass and ' bandpass FIR filters. If you\n" > 'want to read more about DSP I highly recommend\n' > "\\href{http://www.dspguide.com/}{The Scientist and Engineer's Guide to\n" > 'Digital Signal Processing} which is freely available online.\n' > '\n' > '\\subsection{Functions for frequency, phase, impulse and step response}\n' > '\n' > "Let's first define functions to plot filter properties.\n" > '\n' > '\n' > '\n' > '\\begin{verbatim}\n' > 'from pylab import *\n' > 'import scipy.signal as signal\n' > '\n' > '#Plot frequency and phase response\n' > 'def mfreqz(b,a=1):\n' > ' w,h = signal.freqz(b,a)\n' > ' h_dB = 20 * log10 (abs(h))\n' > ' subplot(211)\n' > ' plot(w/max(w),h_dB)\n' > ' ylim(-150, 5)\n' > " ylabel('Magnitude (db)')\n" > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n" > " title(r'Frequency response')\n" > ' subplot(212)\n' > ' h_Phase = unwrap(arctan2(imag(h),real(h)))\n' > ' plot(w/max(w),h_Phase)\n' > " ylabel('Phase (radians)')\n" > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n" > " title(r'Phase response')\n" > ' subplots_adjust(hspace=0.5)\n' > '\n' > '#Plot step and impulse response\n' > 'def impz(b,a=1):\n' > ' l = len(b)\n' > ' impulse = repeat(0.,l); impulse[0] =1.\n' > ' x = arange(0,l)\n' > ' response = signal.lfilter(b,a,impulse)\n' > ' subplot(211)\n' > ' stem(x, response)\n' > " ylabel('Amplitude')\n" > " xlabel(r'n (samples)')\n" > " title(r'Impulse response')\n" > ' subplot(212)\n' > ' step = cumsum(response)\n' > ' stem(x, step)\n' > " ylabel('Amplitude')\n" > " xlabel(r'n (samples)')\n" > " title(r'Step response')\n" > ' subplots_adjust(hspace=0.5)\n' > '\\end{verbatim}\n' > '\n' > '\n' > '\\subsection{Lowpass FIR filter}\n' > '\n' > 'Designing a lowpass FIR filter is very simple to do with SciPy, all you\n' > 'need to do is to define the window length, cut off frequency and the\n' > 'window.\n' > '\n' > 'The Hamming window is defined as:\n' > '$w(n) = \\alpha - \\beta\\cos\\frac{2\\pi n}{N-1}$, where $\\alpha=0.54$ ' > 'and\n' > '$\\beta=0.46$\n' > '\n' > 'The next code chunk is executed in term mode, see the source document\n' > 'for syntax. Notice also that Pweave can now catch multiple\n' > 'figures/code chunk.\n' > '\n' > '\n' > '\\begin{verbatim}\n' > 'n = 61\n' > 'a = signal.firwin(n, cutoff = 0.3, window = "hamming")\n' > '#Frequency and phase response\n' > 'mfreqz(a)\n' > '#Impulse and step response\n' > 'p = figure(2)\n' > 'impz(a)\n' > '\\end{verbatim}\n' > '\n' > '\n' > '\\subsection{Highpass FIR Filter}\n' > '\n' > "Let's define a highpass FIR filter:\n" > '\n' > '\n' > '\\begin{verbatim}\n' > 'n = 101\n' > 'a = signal.firwin(n, cutoff = 0.3, window = "hanning", pass_zero=False)\n' > 'mfreqz(a)\n' > '\\end{verbatim}\n' > '\n' > '\n' > '\\subsection{Bandpass FIR filter}\n' > '\n' > 'Notice that the plot has a caption defined in code chunk options.\n' > '\n' > '\n' > '\n' > '\\begin{verbatim}\n' > 'n = 1001\n' > "a = signal.firwin(n, cutoff = [0.2, 0.5], window = 'blackmanharris', " > 'pass_zero = False)\n' > 'mfreqz(a)\n' > '\\end{verbatim}\n' > '\\begin{figure}[htpb]\n' > '\\center\n' > '\\caption{Bandpass FIR filter.}\n' > '\\label{fig:None}\n' > '\\end{figure}\n' > '\n' > '\n' > '\\end{document}\n') >self = <tests.test_pweave.WeaveTest testMethod=testFIR_FilterExampleTex> > >/usr/lib/python3.8/unittest/case.py:912: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <tests.test_pweave.WeaveTest testMethod=testFIR_FilterExampleTex> >first = '\\documentclass[a4paper,11pt,final]{article}\n\\usepackage{fancyvrb, color, graphicx, hyperref, amsmath, url}\n\\usep...R_design_verb_figure4_1.pdf}\n\\caption{Bandpass FIR filter.}\n\\label{fig:None}\n\\end{figure}\n\n\n\\end{document}\n' >second = '\\documentclass[a4paper,11pt,final]{article}\n\\usepackage{fancyvrb, color, graphicx, hyperref, amsmath, url}\n\\usep...egin{figure}[htpb]\n\\center\n\\caption{Bandpass FIR filter.}\n\\label{fig:None}\n\\end{figure}\n\n\n\\end{document}\n' >msg = None > > def assertMultiLineEqual(self, first, second, msg=None): > """Assert that two multi-line strings are equal.""" > self.assertIsInstance(first, str, 'First argument is not a string') > self.assertIsInstance(second, str, 'Second argument is not a string') > > if first != second: > # don't use difflib if the strings are too long > if (len(first) > self._diffThreshold or > len(second) > self._diffThreshold): > self._baseAssertEqual(first, second, msg) > firstlines = first.splitlines(keepends=True) > secondlines = second.splitlines(keepends=True) > if len(firstlines) == 1 and first.strip('\r\n') == first: > firstlines = [first + '\n'] > secondlines = [second + '\n'] > standardMsg = '%s != %s' % _common_shorten_repr(first, second) > diff = '\n' + ''.join(difflib.ndiff(firstlines, secondlines)) > standardMsg = self._truncateMessage(standardMsg, diff) >> self.fail(self._formatMessage(msg, standardMsg)) > >diff = ('\n' > ' \\documentclass[a4paper,11pt,final]{article}\n' > ' \\usepackage{fancyvrb, color, graphicx, hyperref, amsmath, url}\n' > ' \\usepackage{palatino}\n' > ' \\usepackage[a4paper,text={16.5cm,25.2cm},centering]{geometry}\n' > ' \n' > ' \\hypersetup\n' > ' { pdfauthor = {Matti Pastell},\n' > ' pdftitle={FIR filter design with Python and SciPy},\n' > ' colorlinks=TRUE,\n' > ' linkcolor=black,\n' > ' citecolor=blue,\n' > ' urlcolor=blue\n' > ' }\n' > ' \n' > ' \\setlength{\\parindent}{0pt}\n' > ' \\setlength{\\parskip}{1.2ex}\n' > ' \n' > ' \n' > ' \n' > ' \\title{FIR filter design with Python and SciPy}\n' > ' \\author{Matti Pastell \\\\ \\url{http://mpastell.com}}\n' > ' \\date{15th April 2013}\n' > ' \n' > ' \\begin{document}\n' > ' \\maketitle\n' > ' \n' > ' \n' > ' \\section{Introduction}\n' > ' \n' > ' This an example of a document that can be published using\n' > ' \\href{http://mpastell.com/pweave}{Pweave}. Text is written\n' > ' using \\LaTeX{} and code between \\texttt{<<>>} and \\texttt{@} is ' > 'executed\n' > ' and results are included in the resulting document.\n' > ' \n' > ' You can define various options for code chunks to control code\n' > ' execution and formatting (see\n' > ' \\href{http://mpastell.com/pweave/usage.html\\#code-chunk-options}{Pweave\n' > ' docs}).\n' > ' \n' > ' \\section{FIR Filter Design}\n' > ' \n' > " We'll implement lowpass, highpass and ' bandpass FIR filters. If you\n" > ' want to read more about DSP I highly recommend\n' > " \\href{http://www.dspguide.com/}{The Scientist and Engineer's Guide to\n" > ' Digital Signal Processing} which is freely available online.\n' > ' \n' > ' \\subsection{Functions for frequency, phase, impulse and step response}\n' > ' \n' > " Let's first define functions to plot filter properties.\n" > ' \n' > ' \n' > ' \n' > ' \\begin{verbatim}\n' > ' from pylab import *\n' > ' import scipy.signal as signal\n' > ' \n' > ' #Plot frequency and phase response\n' > ' def mfreqz(b,a=1):\n' > ' w,h = signal.freqz(b,a)\n' > ' h_dB = 20 * log10 (abs(h))\n' > ' subplot(211)\n' > ' plot(w/max(w),h_dB)\n' > ' ylim(-150, 5)\n' > " ylabel('Magnitude (db)')\n" > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n" > " title(r'Frequency response')\n" > ' subplot(212)\n' > ' h_Phase = unwrap(arctan2(imag(h),real(h)))\n' > ' plot(w/max(w),h_Phase)\n' > " ylabel('Phase (radians)')\n" > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n" > " title(r'Phase response')\n" > ' subplots_adjust(hspace=0.5)\n' > ' \n' > ' #Plot step and impulse response\n' > ' def impz(b,a=1):\n' > ' l = len(b)\n' > ' impulse = repeat(0.,l); impulse[0] =1.\n' > ' x = arange(0,l)\n' > ' response = signal.lfilter(b,a,impulse)\n' > ' subplot(211)\n' > ' stem(x, response)\n' > " ylabel('Amplitude')\n" > " xlabel(r'n (samples)')\n" > " title(r'Impulse response')\n" > ' subplot(212)\n' > ' step = cumsum(response)\n' > ' stem(x, step)\n' > " ylabel('Amplitude')\n" > " xlabel(r'n (samples)')\n" > " title(r'Step response')\n" > ' subplots_adjust(hspace=0.5)\n' > ' \\end{verbatim}\n' > ' \n' > ' \n' > ' \\subsection{Lowpass FIR filter}\n' > ' \n' > ' Designing a lowpass FIR filter is very simple to do with SciPy, all you\n' > ' need to do is to define the window length, cut off frequency and the\n' > ' window.\n' > ' \n' > ' The Hamming window is defined as:\n' > ' $w(n) = \\alpha - \\beta\\cos\\frac{2\\pi n}{N-1}$, where $\\alpha=0.54$ ' > 'and\n' > ' $\\beta=0.46$\n' > ' \n' > ' The next code chunk is executed in term mode, see the source document\n' > ' for syntax. Notice also that Pweave can now catch multiple\n' > ' figures/code chunk.\n' > ' \n' > ' \n' > ' \\begin{verbatim}\n' > ' n = 61\n' > ' a = signal.firwin(n, cutoff = 0.3, window = "hamming")\n' > ' #Frequency and phase response\n' > ' mfreqz(a)\n' > ' #Impulse and step response\n' > ' p = figure(2)\n' > ' impz(a)\n' > ' \\end{verbatim}\n' > '- \\includegraphics[width= ' > '\\linewidth]{figures/FIR_design_verb_figure2_1.pdf}\n' > '- \\includegraphics[width= ' > '\\linewidth]{figures/FIR_design_verb_figure2_2.pdf}\n' > ' \n' > ' \n' > ' \\subsection{Highpass FIR Filter}\n' > ' \n' > " Let's define a highpass FIR filter:\n" > ' \n' > ' \n' > ' \\begin{verbatim}\n' > ' n = 101\n' > ' a = signal.firwin(n, cutoff = 0.3, window = "hanning", pass_zero=False)\n' > ' mfreqz(a)\n' > ' \\end{verbatim}\n' > '- \\includegraphics[width= ' > '\\linewidth]{figures/FIR_design_verb_figure3_1.pdf}\n' > ' \n' > ' \n' > ' \\subsection{Bandpass FIR filter}\n' > ' \n' > ' Notice that the plot has a caption defined in code chunk options.\n' > ' \n' > ' \n' > ' \n' > ' \\begin{verbatim}\n' > ' n = 1001\n' > " a = signal.firwin(n, cutoff = [0.2, 0.5], window = 'blackmanharris', " > 'pass_zero = False)\n' > ' mfreqz(a)\n' > ' \\end{verbatim}\n' > ' \\begin{figure}[htpb]\n' > ' \\center\n' > '- \\includegraphics[width= ' > '\\linewidth]{figures/FIR_design_verb_figure4_1.pdf}\n' > ' \\caption{Bandpass FIR filter.}\n' > ' \\label{fig:None}\n' > ' \\end{figure}\n' > ' \n' > ' \n' > ' \\end{document}\n') >first = ('\\documentclass[a4paper,11pt,final]{article}\n' > '\\usepackage{fancyvrb, color, graphicx, hyperref, amsmath, url}\n' > '\\usepackage{palatino}\n' > '\\usepackage[a4paper,text={16.5cm,25.2cm},centering]{geometry}\n' > '\n' > '\\hypersetup\n' > '{ pdfauthor = {Matti Pastell},\n' > ' pdftitle={FIR filter design with Python and SciPy},\n' > ' colorlinks=TRUE,\n' > ' linkcolor=black,\n' > ' citecolor=blue,\n' > ' urlcolor=blue\n' > '}\n' > '\n' > '\\setlength{\\parindent}{0pt}\n' > '\\setlength{\\parskip}{1.2ex}\n' > '\n' > '\n' > '\n' > '\\title{FIR filter design with Python and SciPy}\n' > '\\author{Matti Pastell \\\\ \\url{http://mpastell.com}}\n' > '\\date{15th April 2013}\n' > '\n' > '\\begin{document}\n' > '\\maketitle\n' > '\n' > '\n' > '\\section{Introduction}\n' > '\n' > 'This an example of a document that can be published using\n' > '\\href{http://mpastell.com/pweave}{Pweave}. Text is written\n' > 'using \\LaTeX{} and code between \\texttt{<<>>} and \\texttt{@} is executed\n' > 'and results are included in the resulting document.\n' > '\n' > 'You can define various options for code chunks to control code\n' > 'execution and formatting (see\n' > '\\href{http://mpastell.com/pweave/usage.html\\#code-chunk-options}{Pweave\n' > 'docs}).\n' > '\n' > '\\section{FIR Filter Design}\n' > '\n' > "We'll implement lowpass, highpass and ' bandpass FIR filters. If you\n" > 'want to read more about DSP I highly recommend\n' > "\\href{http://www.dspguide.com/}{The Scientist and Engineer's Guide to\n" > 'Digital Signal Processing} which is freely available online.\n' > '\n' > '\\subsection{Functions for frequency, phase, impulse and step response}\n' > '\n' > "Let's first define functions to plot filter properties.\n" > '\n' > '\n' > '\n' > '\\begin{verbatim}\n' > 'from pylab import *\n' > 'import scipy.signal as signal\n' > '\n' > '#Plot frequency and phase response\n' > 'def mfreqz(b,a=1):\n' > ' w,h = signal.freqz(b,a)\n' > ' h_dB = 20 * log10 (abs(h))\n' > ' subplot(211)\n' > ' plot(w/max(w),h_dB)\n' > ' ylim(-150, 5)\n' > " ylabel('Magnitude (db)')\n" > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n" > " title(r'Frequency response')\n" > ' subplot(212)\n' > ' h_Phase = unwrap(arctan2(imag(h),real(h)))\n' > ' plot(w/max(w),h_Phase)\n' > " ylabel('Phase (radians)')\n" > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n" > " title(r'Phase response')\n" > ' subplots_adjust(hspace=0.5)\n' > '\n' > '#Plot step and impulse response\n' > 'def impz(b,a=1):\n' > ' l = len(b)\n' > ' impulse = repeat(0.,l); impulse[0] =1.\n' > ' x = arange(0,l)\n' > ' response = signal.lfilter(b,a,impulse)\n' > ' subplot(211)\n' > ' stem(x, response)\n' > " ylabel('Amplitude')\n" > " xlabel(r'n (samples)')\n" > " title(r'Impulse response')\n" > ' subplot(212)\n' > ' step = cumsum(response)\n' > ' stem(x, step)\n' > " ylabel('Amplitude')\n" > " xlabel(r'n (samples)')\n" > " title(r'Step response')\n" > ' subplots_adjust(hspace=0.5)\n' > '\\end{verbatim}\n' > '\n' > '\n' > '\\subsection{Lowpass FIR filter}\n' > '\n' > 'Designing a lowpass FIR filter is very simple to do with SciPy, all you\n' > 'need to do is to define the window length, cut off frequency and the\n' > 'window.\n' > '\n' > 'The Hamming window is defined as:\n' > '$w(n) = \\alpha - \\beta\\cos\\frac{2\\pi n}{N-1}$, where $\\alpha=0.54$ ' > 'and\n' > '$\\beta=0.46$\n' > '\n' > 'The next code chunk is executed in term mode, see the source document\n' > 'for syntax. Notice also that Pweave can now catch multiple\n' > 'figures/code chunk.\n' > '\n' > '\n' > '\\begin{verbatim}\n' > 'n = 61\n' > 'a = signal.firwin(n, cutoff = 0.3, window = "hamming")\n' > '#Frequency and phase response\n' > 'mfreqz(a)\n' > '#Impulse and step response\n' > 'p = figure(2)\n' > 'impz(a)\n' > '\\end{verbatim}\n' > '\\includegraphics[width= ' > '\\linewidth]{figures/FIR_design_verb_figure2_1.pdf}\n' > '\\includegraphics[width= ' > '\\linewidth]{figures/FIR_design_verb_figure2_2.pdf}\n' > '\n' > '\n' > '\\subsection{Highpass FIR Filter}\n' > '\n' > "Let's define a highpass FIR filter:\n" > '\n' > '\n' > '\\begin{verbatim}\n' > 'n = 101\n' > 'a = signal.firwin(n, cutoff = 0.3, window = "hanning", pass_zero=False)\n' > 'mfreqz(a)\n' > '\\end{verbatim}\n' > '\\includegraphics[width= ' > '\\linewidth]{figures/FIR_design_verb_figure3_1.pdf}\n' > '\n' > '\n' > '\\subsection{Bandpass FIR filter}\n' > '\n' > 'Notice that the plot has a caption defined in code chunk options.\n' > '\n' > '\n' > '\n' > '\\begin{verbatim}\n' > 'n = 1001\n' > "a = signal.firwin(n, cutoff = [0.2, 0.5], window = 'blackmanharris', " > 'pass_zero = False)\n' > 'mfreqz(a)\n' > '\\end{verbatim}\n' > '\\begin{figure}[htpb]\n' > '\\center\n' > '\\includegraphics[width= ' > '\\linewidth]{figures/FIR_design_verb_figure4_1.pdf}\n' > '\\caption{Bandpass FIR filter.}\n' > '\\label{fig:None}\n' > '\\end{figure}\n' > '\n' > '\n' > '\\end{document}\n') >firstlines = ['\\documentclass[a4paper,11pt,final]{article}\n', > '\\usepackage{fancyvrb, color, graphicx, hyperref, amsmath, url}\n', > '\\usepackage{palatino}\n', > '\\usepackage[a4paper,text={16.5cm,25.2cm},centering]{geometry}\n', > '\n', > '\\hypersetup\n', > '{ pdfauthor = {Matti Pastell},\n', > ' pdftitle={FIR filter design with Python and SciPy},\n', > ' colorlinks=TRUE,\n', > ' linkcolor=black,\n', > ' citecolor=blue,\n', > ' urlcolor=blue\n', > '}\n', > '\n', > '\\setlength{\\parindent}{0pt}\n', > '\\setlength{\\parskip}{1.2ex}\n', > '\n', > '\n', > '\n', > '\\title{FIR filter design with Python and SciPy}\n', > '\\author{Matti Pastell \\\\ \\url{http://mpastell.com}}\n', > '\\date{15th April 2013}\n', > '\n', > '\\begin{document}\n', > '\\maketitle\n', > '\n', > '\n', > '\\section{Introduction}\n', > '\n', > 'This an example of a document that can be published using\n', > '\\href{http://mpastell.com/pweave}{Pweave}. Text is written\n', > 'using \\LaTeX{} and code between \\texttt{<<>>} and \\texttt{@} is ' > 'executed\n', > 'and results are included in the resulting document.\n', > '\n', > 'You can define various options for code chunks to control code\n', > 'execution and formatting (see\n', > '\\href{http://mpastell.com/pweave/usage.html\\#code-chunk-options}{Pweave\n', > 'docs}).\n', > '\n', > '\\section{FIR Filter Design}\n', > '\n', > "We'll implement lowpass, highpass and ' bandpass FIR filters. If you\n", > 'want to read more about DSP I highly recommend\n', > "\\href{http://www.dspguide.com/}{The Scientist and Engineer's Guide to\n", > 'Digital Signal Processing} which is freely available online.\n', > '\n', > '\\subsection{Functions for frequency, phase, impulse and step response}\n', > '\n', > "Let's first define functions to plot filter properties.\n", > '\n', > '\n', > '\n', > '\\begin{verbatim}\n', > 'from pylab import *\n', > 'import scipy.signal as signal\n', > '\n', > '#Plot frequency and phase response\n', > 'def mfreqz(b,a=1):\n', > ' w,h = signal.freqz(b,a)\n', > ' h_dB = 20 * log10 (abs(h))\n', > ' subplot(211)\n', > ' plot(w/max(w),h_dB)\n', > ' ylim(-150, 5)\n', > " ylabel('Magnitude (db)')\n", > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n", > " title(r'Frequency response')\n", > ' subplot(212)\n', > ' h_Phase = unwrap(arctan2(imag(h),real(h)))\n', > ' plot(w/max(w),h_Phase)\n', > " ylabel('Phase (radians)')\n", > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n", > " title(r'Phase response')\n", > ' subplots_adjust(hspace=0.5)\n', > '\n', > '#Plot step and impulse response\n', > 'def impz(b,a=1):\n', > ' l = len(b)\n', > ' impulse = repeat(0.,l); impulse[0] =1.\n', > ' x = arange(0,l)\n', > ' response = signal.lfilter(b,a,impulse)\n', > ' subplot(211)\n', > ' stem(x, response)\n', > " ylabel('Amplitude')\n", > " xlabel(r'n (samples)')\n", > " title(r'Impulse response')\n", > ' subplot(212)\n', > ' step = cumsum(response)\n', > ' stem(x, step)\n', > " ylabel('Amplitude')\n", > " xlabel(r'n (samples)')\n", > " title(r'Step response')\n", > ' subplots_adjust(hspace=0.5)\n', > '\\end{verbatim}\n', > '\n', > '\n', > '\\subsection{Lowpass FIR filter}\n', > '\n', > 'Designing a lowpass FIR filter is very simple to do with SciPy, all you\n', > 'need to do is to define the window length, cut off frequency and the\n', > 'window.\n', > '\n', > 'The Hamming window is defined as:\n', > '$w(n) = \\alpha - \\beta\\cos\\frac{2\\pi n}{N-1}$, where $\\alpha=0.54$ ' > 'and\n', > '$\\beta=0.46$\n', > '\n', > 'The next code chunk is executed in term mode, see the source document\n', > 'for syntax. Notice also that Pweave can now catch multiple\n', > 'figures/code chunk.\n', > '\n', > '\n', > '\\begin{verbatim}\n', > 'n = 61\n', > 'a = signal.firwin(n, cutoff = 0.3, window = "hamming")\n', > '#Frequency and phase response\n', > 'mfreqz(a)\n', > '#Impulse and step response\n', > 'p = figure(2)\n', > 'impz(a)\n', > '\\end{verbatim}\n', > '\\includegraphics[width= ' > '\\linewidth]{figures/FIR_design_verb_figure2_1.pdf}\n', > '\\includegraphics[width= ' > '\\linewidth]{figures/FIR_design_verb_figure2_2.pdf}\n', > '\n', > '\n', > '\\subsection{Highpass FIR Filter}\n', > '\n', > "Let's define a highpass FIR filter:\n", > '\n', > '\n', > '\\begin{verbatim}\n', > 'n = 101\n', > 'a = signal.firwin(n, cutoff = 0.3, window = "hanning", pass_zero=False)\n', > 'mfreqz(a)\n', > '\\end{verbatim}\n', > '\\includegraphics[width= ' > '\\linewidth]{figures/FIR_design_verb_figure3_1.pdf}\n', > '\n', > '\n', > '\\subsection{Bandpass FIR filter}\n', > '\n', > 'Notice that the plot has a caption defined in code chunk options.\n', > '\n', > '\n', > '\n', > '\\begin{verbatim}\n', > 'n = 1001\n', > "a = signal.firwin(n, cutoff = [0.2, 0.5], window = 'blackmanharris', " > 'pass_zero = False)\n', > 'mfreqz(a)\n', > '\\end{verbatim}\n', > '\\begin{figure}[htpb]\n', > '\\center\n', > '\\includegraphics[width= ' > '\\linewidth]{figures/FIR_design_verb_figure4_1.pdf}\n', > '\\caption{Bandpass FIR filter.}\n', > '\\label{fig:None}\n', > '\\end{figure}\n', > '\n', > '\n', > '\\end{document}\n'] >msg = None >second = ('\\documentclass[a4paper,11pt,final]{article}\n' > '\\usepackage{fancyvrb, color, graphicx, hyperref, amsmath, url}\n' > '\\usepackage{palatino}\n' > '\\usepackage[a4paper,text={16.5cm,25.2cm},centering]{geometry}\n' > '\n' > '\\hypersetup\n' > '{ pdfauthor = {Matti Pastell},\n' > ' pdftitle={FIR filter design with Python and SciPy},\n' > ' colorlinks=TRUE,\n' > ' linkcolor=black,\n' > ' citecolor=blue,\n' > ' urlcolor=blue\n' > '}\n' > '\n' > '\\setlength{\\parindent}{0pt}\n' > '\\setlength{\\parskip}{1.2ex}\n' > '\n' > '\n' > '\n' > '\\title{FIR filter design with Python and SciPy}\n' > '\\author{Matti Pastell \\\\ \\url{http://mpastell.com}}\n' > '\\date{15th April 2013}\n' > '\n' > '\\begin{document}\n' > '\\maketitle\n' > '\n' > '\n' > '\\section{Introduction}\n' > '\n' > 'This an example of a document that can be published using\n' > '\\href{http://mpastell.com/pweave}{Pweave}. Text is written\n' > 'using \\LaTeX{} and code between \\texttt{<<>>} and \\texttt{@} is executed\n' > 'and results are included in the resulting document.\n' > '\n' > 'You can define various options for code chunks to control code\n' > 'execution and formatting (see\n' > '\\href{http://mpastell.com/pweave/usage.html\\#code-chunk-options}{Pweave\n' > 'docs}).\n' > '\n' > '\\section{FIR Filter Design}\n' > '\n' > "We'll implement lowpass, highpass and ' bandpass FIR filters. If you\n" > 'want to read more about DSP I highly recommend\n' > "\\href{http://www.dspguide.com/}{The Scientist and Engineer's Guide to\n" > 'Digital Signal Processing} which is freely available online.\n' > '\n' > '\\subsection{Functions for frequency, phase, impulse and step response}\n' > '\n' > "Let's first define functions to plot filter properties.\n" > '\n' > '\n' > '\n' > '\\begin{verbatim}\n' > 'from pylab import *\n' > 'import scipy.signal as signal\n' > '\n' > '#Plot frequency and phase response\n' > 'def mfreqz(b,a=1):\n' > ' w,h = signal.freqz(b,a)\n' > ' h_dB = 20 * log10 (abs(h))\n' > ' subplot(211)\n' > ' plot(w/max(w),h_dB)\n' > ' ylim(-150, 5)\n' > " ylabel('Magnitude (db)')\n" > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n" > " title(r'Frequency response')\n" > ' subplot(212)\n' > ' h_Phase = unwrap(arctan2(imag(h),real(h)))\n' > ' plot(w/max(w),h_Phase)\n' > " ylabel('Phase (radians)')\n" > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n" > " title(r'Phase response')\n" > ' subplots_adjust(hspace=0.5)\n' > '\n' > '#Plot step and impulse response\n' > 'def impz(b,a=1):\n' > ' l = len(b)\n' > ' impulse = repeat(0.,l); impulse[0] =1.\n' > ' x = arange(0,l)\n' > ' response = signal.lfilter(b,a,impulse)\n' > ' subplot(211)\n' > ' stem(x, response)\n' > " ylabel('Amplitude')\n" > " xlabel(r'n (samples)')\n" > " title(r'Impulse response')\n" > ' subplot(212)\n' > ' step = cumsum(response)\n' > ' stem(x, step)\n' > " ylabel('Amplitude')\n" > " xlabel(r'n (samples)')\n" > " title(r'Step response')\n" > ' subplots_adjust(hspace=0.5)\n' > '\\end{verbatim}\n' > '\n' > '\n' > '\\subsection{Lowpass FIR filter}\n' > '\n' > 'Designing a lowpass FIR filter is very simple to do with SciPy, all you\n' > 'need to do is to define the window length, cut off frequency and the\n' > 'window.\n' > '\n' > 'The Hamming window is defined as:\n' > '$w(n) = \\alpha - \\beta\\cos\\frac{2\\pi n}{N-1}$, where $\\alpha=0.54$ ' > 'and\n' > '$\\beta=0.46$\n' > '\n' > 'The next code chunk is executed in term mode, see the source document\n' > 'for syntax. Notice also that Pweave can now catch multiple\n' > 'figures/code chunk.\n' > '\n' > '\n' > '\\begin{verbatim}\n' > 'n = 61\n' > 'a = signal.firwin(n, cutoff = 0.3, window = "hamming")\n' > '#Frequency and phase response\n' > 'mfreqz(a)\n' > '#Impulse and step response\n' > 'p = figure(2)\n' > 'impz(a)\n' > '\\end{verbatim}\n' > '\n' > '\n' > '\\subsection{Highpass FIR Filter}\n' > '\n' > "Let's define a highpass FIR filter:\n" > '\n' > '\n' > '\\begin{verbatim}\n' > 'n = 101\n' > 'a = signal.firwin(n, cutoff = 0.3, window = "hanning", pass_zero=False)\n' > 'mfreqz(a)\n' > '\\end{verbatim}\n' > '\n' > '\n' > '\\subsection{Bandpass FIR filter}\n' > '\n' > 'Notice that the plot has a caption defined in code chunk options.\n' > '\n' > '\n' > '\n' > '\\begin{verbatim}\n' > 'n = 1001\n' > "a = signal.firwin(n, cutoff = [0.2, 0.5], window = 'blackmanharris', " > 'pass_zero = False)\n' > 'mfreqz(a)\n' > '\\end{verbatim}\n' > '\\begin{figure}[htpb]\n' > '\\center\n' > '\\caption{Bandpass FIR filter.}\n' > '\\label{fig:None}\n' > '\\end{figure}\n' > '\n' > '\n' > '\\end{document}\n') >secondlines = ['\\documentclass[a4paper,11pt,final]{article}\n', > '\\usepackage{fancyvrb, color, graphicx, hyperref, amsmath, url}\n', > '\\usepackage{palatino}\n', > '\\usepackage[a4paper,text={16.5cm,25.2cm},centering]{geometry}\n', > '\n', > '\\hypersetup\n', > '{ pdfauthor = {Matti Pastell},\n', > ' pdftitle={FIR filter design with Python and SciPy},\n', > ' colorlinks=TRUE,\n', > ' linkcolor=black,\n', > ' citecolor=blue,\n', > ' urlcolor=blue\n', > '}\n', > '\n', > '\\setlength{\\parindent}{0pt}\n', > '\\setlength{\\parskip}{1.2ex}\n', > '\n', > '\n', > '\n', > '\\title{FIR filter design with Python and SciPy}\n', > '\\author{Matti Pastell \\\\ \\url{http://mpastell.com}}\n', > '\\date{15th April 2013}\n', > '\n', > '\\begin{document}\n', > '\\maketitle\n', > '\n', > '\n', > '\\section{Introduction}\n', > '\n', > 'This an example of a document that can be published using\n', > '\\href{http://mpastell.com/pweave}{Pweave}. Text is written\n', > 'using \\LaTeX{} and code between \\texttt{<<>>} and \\texttt{@} is ' > 'executed\n', > 'and results are included in the resulting document.\n', > '\n', > 'You can define various options for code chunks to control code\n', > 'execution and formatting (see\n', > '\\href{http://mpastell.com/pweave/usage.html\\#code-chunk-options}{Pweave\n', > 'docs}).\n', > '\n', > '\\section{FIR Filter Design}\n', > '\n', > "We'll implement lowpass, highpass and ' bandpass FIR filters. If you\n", > 'want to read more about DSP I highly recommend\n', > "\\href{http://www.dspguide.com/}{The Scientist and Engineer's Guide to\n", > 'Digital Signal Processing} which is freely available online.\n', > '\n', > '\\subsection{Functions for frequency, phase, impulse and step response}\n', > '\n', > "Let's first define functions to plot filter properties.\n", > '\n', > '\n', > '\n', > '\\begin{verbatim}\n', > 'from pylab import *\n', > 'import scipy.signal as signal\n', > '\n', > '#Plot frequency and phase response\n', > 'def mfreqz(b,a=1):\n', > ' w,h = signal.freqz(b,a)\n', > ' h_dB = 20 * log10 (abs(h))\n', > ' subplot(211)\n', > ' plot(w/max(w),h_dB)\n', > ' ylim(-150, 5)\n', > " ylabel('Magnitude (db)')\n", > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n", > " title(r'Frequency response')\n", > ' subplot(212)\n', > ' h_Phase = unwrap(arctan2(imag(h),real(h)))\n', > ' plot(w/max(w),h_Phase)\n', > " ylabel('Phase (radians)')\n", > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n", > " title(r'Phase response')\n", > ' subplots_adjust(hspace=0.5)\n', > '\n', > '#Plot step and impulse response\n', > 'def impz(b,a=1):\n', > ' l = len(b)\n', > ' impulse = repeat(0.,l); impulse[0] =1.\n', > ' x = arange(0,l)\n', > ' response = signal.lfilter(b,a,impulse)\n', > ' subplot(211)\n', > ' stem(x, response)\n', > " ylabel('Amplitude')\n", > " xlabel(r'n (samples)')\n", > " title(r'Impulse response')\n", > ' subplot(212)\n', > ' step = cumsum(response)\n', > ' stem(x, step)\n', > " ylabel('Amplitude')\n", > " xlabel(r'n (samples)')\n", > " title(r'Step response')\n", > ' subplots_adjust(hspace=0.5)\n', > '\\end{verbatim}\n', > '\n', > '\n', > '\\subsection{Lowpass FIR filter}\n', > '\n', > 'Designing a lowpass FIR filter is very simple to do with SciPy, all you\n', > 'need to do is to define the window length, cut off frequency and the\n', > 'window.\n', > '\n', > 'The Hamming window is defined as:\n', > '$w(n) = \\alpha - \\beta\\cos\\frac{2\\pi n}{N-1}$, where $\\alpha=0.54$ ' > 'and\n', > '$\\beta=0.46$\n', > '\n', > 'The next code chunk is executed in term mode, see the source document\n', > 'for syntax. Notice also that Pweave can now catch multiple\n', > 'figures/code chunk.\n', > '\n', > '\n', > '\\begin{verbatim}\n', > 'n = 61\n', > 'a = signal.firwin(n, cutoff = 0.3, window = "hamming")\n', > '#Frequency and phase response\n', > 'mfreqz(a)\n', > '#Impulse and step response\n', > 'p = figure(2)\n', > 'impz(a)\n', > '\\end{verbatim}\n', > '\n', > '\n', > '\\subsection{Highpass FIR Filter}\n', > '\n', > "Let's define a highpass FIR filter:\n", > '\n', > '\n', > '\\begin{verbatim}\n', > 'n = 101\n', > 'a = signal.firwin(n, cutoff = 0.3, window = "hanning", pass_zero=False)\n', > 'mfreqz(a)\n', > '\\end{verbatim}\n', > '\n', > '\n', > '\\subsection{Bandpass FIR filter}\n', > '\n', > 'Notice that the plot has a caption defined in code chunk options.\n', > '\n', > '\n', > '\n', > '\\begin{verbatim}\n', > 'n = 1001\n', > "a = signal.firwin(n, cutoff = [0.2, 0.5], window = 'blackmanharris', " > 'pass_zero = False)\n', > 'mfreqz(a)\n', > '\\end{verbatim}\n', > '\\begin{figure}[htpb]\n', > '\\center\n', > '\\caption{Bandpass FIR filter.}\n', > '\\label{fig:None}\n', > '\\end{figure}\n', > '\n', > '\n', > '\\end{document}\n'] >self = <tests.test_pweave.WeaveTest testMethod=testFIR_FilterExampleTex> >standardMsg = ("'\\\\do[3321 chars]m}\\n\\\\includegraphics[width= \\\\linewidth]{figu[861 " > "chars]t}\\n' != '\\\\do[3321 chars]m}\\n\\n\\n\\\\subsection{Highpass FIR " > "Filter}\\n\\nL[549 chars]t}\\n'\n" > 'Diff is 4301 characters long. Set self.maxDiff to None to see it.') > >/usr/lib/python3.8/unittest/case.py:1292: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <tests.test_pweave.WeaveTest testMethod=testFIR_FilterExampleTex> >msg = "'\\\\do[3321 chars]m}\\n\\\\includegraphics[width= \\\\linewidth]{figu[861 chars]t}\\n' != '\\\\do[3321 chars]m}\\n\\...ection{Highpass FIR Filter}\\n\\nL[549 chars]t}\\n'\nDiff is 4301 characters long. Set self.maxDiff to None to see it." > > def fail(self, msg=None): > """Fail immediately, with the given message.""" >> raise self.failureException(msg) >E AssertionError: '\\do[3321 chars]m}\n\\includegraphics[width= \\linewidth]{figu[861 chars]t}\n' != '\\do[3321 chars]m}\n\n\n\\subsection{Highpass FIR Filter}\n\nL[549 chars]t}\n' >E Diff is 4301 characters long. Set self.maxDiff to None to see it. > >msg = ("'\\\\do[3321 chars]m}\\n\\\\includegraphics[width= \\\\linewidth]{figu[861 " > "chars]t}\\n' != '\\\\do[3321 chars]m}\\n\\n\\n\\\\subsection{Highpass FIR " > "Filter}\\n\\nL[549 chars]t}\\n'\n" > 'Diff is 4301 characters long. Set self.maxDiff to None to see it.') >self = <tests.test_pweave.WeaveTest testMethod=testFIR_FilterExampleTex> > >/usr/lib/python3.8/unittest/case.py:753: AssertionError > >During handling of the above exception, another exception occurred: > >self = <tests.test_pweave.WeaveTest testMethod=testFIR_FilterExampleTex> > > def testMethod(self): > self.TESTDIR = os.path.join('weave', doctype) > infile = self.absPathTo(filename + 'w') > self.setNewOutfile(filename) > > pweave.weave(infile, doctype=doctype, > output=self.absPathTo(filename), > **kwargs) > > basename, _, ext = filename.rpartition('.') > self.REFERENCE = self.absPathTo(basename + '_REF.' + ext) >> self.assertSameAsReference() > >_ = '.' >basename = 'FIR_design_verb' >doctype = 'tex' >ext = 'tex' >filename = 'FIR_design_verb.tex' >infile = '/var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/weave/tex/FIR_design_verb.texw' >kwargs = {} >self = <tests.test_pweave.WeaveTest testMethod=testFIR_FilterExampleTex> > >tests/test_pweave.py:31: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <tests.test_pweave.WeaveTest testMethod=testFIR_FilterExampleTex> >reference = None > > def assertSameAsReference(self, reference=None): > try: > self.assertEqual(self.contentOf(reference if reference is not None else self.REFERENCE), > self.contentOf(self.OUTFILE)) > except AssertionError: >> raise AssertionError("{ref} and {out} differs\ntry:\n$ vimdiff {ref} {out}".format( > ref=self.absPathTo(self.REFERENCE), > out=self.absPathTo(self.OUTFILE))) >E AssertionError: /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/weave/tex/FIR_design_verb_REF.tex and /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/weave/tex/FIR_design_verb.tex differs >E try: >E $ vimdiff /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/weave/tex/FIR_design_verb_REF.tex /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/weave/tex/FIR_design_verb.tex > >reference = None >self = <tests.test_pweave.WeaveTest testMethod=testFIR_FilterExampleTex> > >tests/_frameworkForTests.py:37: AssertionError >----------------------------- Captured stdout call ----------------------------- >status >Processing chunk 1 named None from line 92 >Processing chunk 2 named None from line 116 >Processing chunk 3 named None from line 126 >Processing chunk 4 named None from line 137 >Weaved /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/weave/tex/FIR_design_verb.texw to /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/weave/tex/FIR_design_verb.tex >_____________________________ WeaveTest.testSimple _____________________________ > >self = <tests.test_pweave.WeaveTest testMethod=testSimple>, reference = None > > def assertSameAsReference(self, reference=None): > try: >> self.assertEqual(self.contentOf(reference if reference is not None else self.REFERENCE), > self.contentOf(self.OUTFILE)) > >reference = None >self = <tests.test_pweave.WeaveTest testMethod=testSimple> > >tests/_frameworkForTests.py:34: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <tests.test_pweave.WeaveTest testMethod=testSimple> >first = '% FIR filter design with Python and SciPy\n% Matti Pastell\n% 15th April 2013\n\n# Introduction\n\nThis an example of...hat Pweave can now catch multiple figures/code chunk.\n\n\n\n![Bandpass FIR filter.](figures/simple_figure2_1.png)\n\n' >second = '% FIR filter design with Python and SciPy\n% Matti Pastell\n% 15th April 2013\n\n# Introduction\n\nThis an example of...ython script](FIR_design.py) for syntax.\nNotice also that Pweave can now catch multiple figures/code chunk.\n\n\n\n\n' >msg = None > > def assertEqual(self, first, second, msg=None): > """Fail if the two objects are unequal as determined by the '==' > operator. > """ > assertion_func = self._getAssertEqualityFunc(first, second) >> assertion_func(first, second, msg=msg) > >assertion_func = <bound method TestCase.assertMultiLineEqual of <tests.test_pweave.WeaveTest testMethod=testSimple>> >first = ('% FIR filter design with Python and SciPy\n' > '% Matti Pastell\n' > '% 15th April 2013\n' > '\n' > '# Introduction\n' > '\n' > 'This an example of a script that can be published using\n' > '[Pweave](http://mpastell.com/pweave). The script can be executed\n' > 'normally using Python or published to HTML with Pweave\n' > 'Text is written in markdown in lines starting with "`#\'` " and code\n' > 'is executed and results are included in the published document.\n' > 'The concept is similar to\n' > 'publishing documents with [MATLAB](http://mathworks.com) or using\n' > 'stitch with [Knitr](http://http://yihui.name/knitr/demo/stitch/).\n' > '\n' > '\n' > '```python\n' > 'from pylab import *\n' > 'import scipy.signal as signal\n' > ' \n' > '#Plot frequency and phase response\n' > 'def mfreqz(b,a=1):\n' > ' w,h = signal.freqz(b,a)\n' > ' h_dB = 20 * log10 (abs(h))\n' > ' subplot(211)\n' > ' plot(w/max(w),h_dB)\n' > ' ylim(-150, 5)\n' > " ylabel('Magnitude (db)')\n" > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n" > " title(r'Frequency response')\n" > ' subplot(212)\n' > ' h_Phase = unwrap(arctan2(imag(h),real(h)))\n' > ' plot(w/max(w),h_Phase)\n' > " ylabel('Phase (radians)')\n" > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n" > " title(r'Phase response')\n" > ' subplots_adjust(hspace=0.5)\n' > '\n' > '#Plot step and impulse response\n' > 'def impz(b,a=1):\n' > ' l = len(b)\n' > ' impulse = repeat(0.,l); impulse[0] =1.\n' > ' x = arange(0,l)\n' > ' response = signal.lfilter(b,a,impulse)\n' > ' subplot(211)\n' > ' stem(x, response)\n' > " ylabel('Amplitude')\n" > " xlabel(r'n (samples)')\n" > " title(r'Impulse response')\n" > ' subplot(212)\n' > ' step = cumsum(response)\n' > ' stem(x, step)\n' > " ylabel('Amplitude')\n" > " xlabel(r'n (samples)')\n" > " title(r'Step response')\n" > ' subplots_adjust(hspace=0.5)\n' > '```\n' > '\n' > '\n' > '\n' > '## Lowpass FIR filter\n' > '\n' > 'Designing a lowpass FIR filter is very simple to do with SciPy, all you\n' > 'need to do is to define the window length, cut off frequency and the\n' > 'window.\n' > '\n' > 'The Hamming window is defined as:\n' > '$w(n) = \\alpha - \\beta\\cos\\frac{2\\pi n}{N-1}$, where $\\alpha=0.54$ and ' > '$\\beta=0.46$ \n' > '\n' > 'The next code chunk is executed in term mode, see the [Python ' > 'script](FIR_design.py) for syntax.\n' > 'Notice also that Pweave can now catch multiple figures/code chunk.\n' > '\n' > '\n' > '\n' > '![Bandpass FIR filter.](figures/simple_figure2_1.png)\n' > '\n') >msg = None >second = ('% FIR filter design with Python and SciPy\n' > '% Matti Pastell\n' > '% 15th April 2013\n' > '\n' > '# Introduction\n' > '\n' > 'This an example of a script that can be published using\n' > '[Pweave](http://mpastell.com/pweave). The script can be executed\n' > 'normally using Python or published to HTML with Pweave\n' > 'Text is written in markdown in lines starting with "`#\'` " and code\n' > 'is executed and results are included in the published document.\n' > 'The concept is similar to\n' > 'publishing documents with [MATLAB](http://mathworks.com) or using\n' > 'stitch with [Knitr](http://http://yihui.name/knitr/demo/stitch/).\n' > '\n' > '\n' > '```python\n' > 'from pylab import *\n' > 'import scipy.signal as signal\n' > ' \n' > '#Plot frequency and phase response\n' > 'def mfreqz(b,a=1):\n' > ' w,h = signal.freqz(b,a)\n' > ' h_dB = 20 * log10 (abs(h))\n' > ' subplot(211)\n' > ' plot(w/max(w),h_dB)\n' > ' ylim(-150, 5)\n' > " ylabel('Magnitude (db)')\n" > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n" > " title(r'Frequency response')\n" > ' subplot(212)\n' > ' h_Phase = unwrap(arctan2(imag(h),real(h)))\n' > ' plot(w/max(w),h_Phase)\n' > " ylabel('Phase (radians)')\n" > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n" > " title(r'Phase response')\n" > ' subplots_adjust(hspace=0.5)\n' > '\n' > '#Plot step and impulse response\n' > 'def impz(b,a=1):\n' > ' l = len(b)\n' > ' impulse = repeat(0.,l); impulse[0] =1.\n' > ' x = arange(0,l)\n' > ' response = signal.lfilter(b,a,impulse)\n' > ' subplot(211)\n' > ' stem(x, response)\n' > " ylabel('Amplitude')\n" > " xlabel(r'n (samples)')\n" > " title(r'Impulse response')\n" > ' subplot(212)\n' > ' step = cumsum(response)\n' > ' stem(x, step)\n' > " ylabel('Amplitude')\n" > " xlabel(r'n (samples)')\n" > " title(r'Step response')\n" > ' subplots_adjust(hspace=0.5)\n' > '```\n' > '\n' > '\n' > '\n' > '## Lowpass FIR filter\n' > '\n' > 'Designing a lowpass FIR filter is very simple to do with SciPy, all you\n' > 'need to do is to define the window length, cut off frequency and the\n' > 'window.\n' > '\n' > 'The Hamming window is defined as:\n' > '$w(n) = \\alpha - \\beta\\cos\\frac{2\\pi n}{N-1}$, where $\\alpha=0.54$ and ' > '$\\beta=0.46$ \n' > '\n' > 'The next code chunk is executed in term mode, see the [Python ' > 'script](FIR_design.py) for syntax.\n' > 'Notice also that Pweave can now catch multiple figures/code chunk.\n' > '\n' > '\n' > '\n' > '\n') >self = <tests.test_pweave.WeaveTest testMethod=testSimple> > >/usr/lib/python3.8/unittest/case.py:912: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <tests.test_pweave.WeaveTest testMethod=testSimple> >first = '% FIR filter design with Python and SciPy\n% Matti Pastell\n% 15th April 2013\n\n# Introduction\n\nThis an example of...hat Pweave can now catch multiple figures/code chunk.\n\n\n\n![Bandpass FIR filter.](figures/simple_figure2_1.png)\n\n' >second = '% FIR filter design with Python and SciPy\n% Matti Pastell\n% 15th April 2013\n\n# Introduction\n\nThis an example of...ython script](FIR_design.py) for syntax.\nNotice also that Pweave can now catch multiple figures/code chunk.\n\n\n\n\n' >msg = None > > def assertMultiLineEqual(self, first, second, msg=None): > """Assert that two multi-line strings are equal.""" > self.assertIsInstance(first, str, 'First argument is not a string') > self.assertIsInstance(second, str, 'Second argument is not a string') > > if first != second: > # don't use difflib if the strings are too long > if (len(first) > self._diffThreshold or > len(second) > self._diffThreshold): > self._baseAssertEqual(first, second, msg) > firstlines = first.splitlines(keepends=True) > secondlines = second.splitlines(keepends=True) > if len(firstlines) == 1 and first.strip('\r\n') == first: > firstlines = [first + '\n'] > secondlines = [second + '\n'] > standardMsg = '%s != %s' % _common_shorten_repr(first, second) > diff = '\n' + ''.join(difflib.ndiff(firstlines, secondlines)) > standardMsg = self._truncateMessage(standardMsg, diff) >> self.fail(self._formatMessage(msg, standardMsg)) > >diff = ('\n' > ' % FIR filter design with Python and SciPy\n' > ' % Matti Pastell\n' > ' % 15th April 2013\n' > ' \n' > ' # Introduction\n' > ' \n' > ' This an example of a script that can be published using\n' > ' [Pweave](http://mpastell.com/pweave). The script can be executed\n' > ' normally using Python or published to HTML with Pweave\n' > ' Text is written in markdown in lines starting with "`#\'` " and code\n' > ' is executed and results are included in the published document.\n' > ' The concept is similar to\n' > ' publishing documents with [MATLAB](http://mathworks.com) or using\n' > ' stitch with [Knitr](http://http://yihui.name/knitr/demo/stitch/).\n' > ' \n' > ' \n' > ' ```python\n' > ' from pylab import *\n' > ' import scipy.signal as signal\n' > ' \n' > ' #Plot frequency and phase response\n' > ' def mfreqz(b,a=1):\n' > ' w,h = signal.freqz(b,a)\n' > ' h_dB = 20 * log10 (abs(h))\n' > ' subplot(211)\n' > ' plot(w/max(w),h_dB)\n' > ' ylim(-150, 5)\n' > " ylabel('Magnitude (db)')\n" > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n" > " title(r'Frequency response')\n" > ' subplot(212)\n' > ' h_Phase = unwrap(arctan2(imag(h),real(h)))\n' > ' plot(w/max(w),h_Phase)\n' > " ylabel('Phase (radians)')\n" > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n" > " title(r'Phase response')\n" > ' subplots_adjust(hspace=0.5)\n' > ' \n' > ' #Plot step and impulse response\n' > ' def impz(b,a=1):\n' > ' l = len(b)\n' > ' impulse = repeat(0.,l); impulse[0] =1.\n' > ' x = arange(0,l)\n' > ' response = signal.lfilter(b,a,impulse)\n' > ' subplot(211)\n' > ' stem(x, response)\n' > " ylabel('Amplitude')\n" > " xlabel(r'n (samples)')\n" > " title(r'Impulse response')\n" > ' subplot(212)\n' > ' step = cumsum(response)\n' > ' stem(x, step)\n' > " ylabel('Amplitude')\n" > " xlabel(r'n (samples)')\n" > " title(r'Step response')\n" > ' subplots_adjust(hspace=0.5)\n' > ' ```\n' > ' \n' > ' \n' > ' \n' > ' ## Lowpass FIR filter\n' > ' \n' > ' Designing a lowpass FIR filter is very simple to do with SciPy, all you\n' > ' need to do is to define the window length, cut off frequency and the\n' > ' window.\n' > ' \n' > ' The Hamming window is defined as:\n' > ' $w(n) = \\alpha - \\beta\\cos\\frac{2\\pi n}{N-1}$, where $\\alpha=0.54$ ' > 'and $\\beta=0.46$ \n' > ' \n' > ' The next code chunk is executed in term mode, see the [Python ' > 'script](FIR_design.py) for syntax.\n' > ' Notice also that Pweave can now catch multiple figures/code chunk.\n' > ' \n' > ' \n' > ' \n' > '- ![Bandpass FIR filter.](figures/simple_figure2_1.png)\n' > ' \n') >first = ('% FIR filter design with Python and SciPy\n' > '% Matti Pastell\n' > '% 15th April 2013\n' > '\n' > '# Introduction\n' > '\n' > 'This an example of a script that can be published using\n' > '[Pweave](http://mpastell.com/pweave). The script can be executed\n' > 'normally using Python or published to HTML with Pweave\n' > 'Text is written in markdown in lines starting with "`#\'` " and code\n' > 'is executed and results are included in the published document.\n' > 'The concept is similar to\n' > 'publishing documents with [MATLAB](http://mathworks.com) or using\n' > 'stitch with [Knitr](http://http://yihui.name/knitr/demo/stitch/).\n' > '\n' > '\n' > '```python\n' > 'from pylab import *\n' > 'import scipy.signal as signal\n' > ' \n' > '#Plot frequency and phase response\n' > 'def mfreqz(b,a=1):\n' > ' w,h = signal.freqz(b,a)\n' > ' h_dB = 20 * log10 (abs(h))\n' > ' subplot(211)\n' > ' plot(w/max(w),h_dB)\n' > ' ylim(-150, 5)\n' > " ylabel('Magnitude (db)')\n" > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n" > " title(r'Frequency response')\n" > ' subplot(212)\n' > ' h_Phase = unwrap(arctan2(imag(h),real(h)))\n' > ' plot(w/max(w),h_Phase)\n' > " ylabel('Phase (radians)')\n" > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n" > " title(r'Phase response')\n" > ' subplots_adjust(hspace=0.5)\n' > '\n' > '#Plot step and impulse response\n' > 'def impz(b,a=1):\n' > ' l = len(b)\n' > ' impulse = repeat(0.,l); impulse[0] =1.\n' > ' x = arange(0,l)\n' > ' response = signal.lfilter(b,a,impulse)\n' > ' subplot(211)\n' > ' stem(x, response)\n' > " ylabel('Amplitude')\n" > " xlabel(r'n (samples)')\n" > " title(r'Impulse response')\n" > ' subplot(212)\n' > ' step = cumsum(response)\n' > ' stem(x, step)\n' > " ylabel('Amplitude')\n" > " xlabel(r'n (samples)')\n" > " title(r'Step response')\n" > ' subplots_adjust(hspace=0.5)\n' > '```\n' > '\n' > '\n' > '\n' > '## Lowpass FIR filter\n' > '\n' > 'Designing a lowpass FIR filter is very simple to do with SciPy, all you\n' > 'need to do is to define the window length, cut off frequency and the\n' > 'window.\n' > '\n' > 'The Hamming window is defined as:\n' > '$w(n) = \\alpha - \\beta\\cos\\frac{2\\pi n}{N-1}$, where $\\alpha=0.54$ and ' > '$\\beta=0.46$ \n' > '\n' > 'The next code chunk is executed in term mode, see the [Python ' > 'script](FIR_design.py) for syntax.\n' > 'Notice also that Pweave can now catch multiple figures/code chunk.\n' > '\n' > '\n' > '\n' > '![Bandpass FIR filter.](figures/simple_figure2_1.png)\n' > '\n') >firstlines = ['% FIR filter design with Python and SciPy\n', > '% Matti Pastell\n', > '% 15th April 2013\n', > '\n', > '# Introduction\n', > '\n', > 'This an example of a script that can be published using\n', > '[Pweave](http://mpastell.com/pweave). The script can be executed\n', > 'normally using Python or published to HTML with Pweave\n', > 'Text is written in markdown in lines starting with "`#\'` " and code\n', > 'is executed and results are included in the published document.\n', > 'The concept is similar to\n', > 'publishing documents with [MATLAB](http://mathworks.com) or using\n', > 'stitch with [Knitr](http://http://yihui.name/knitr/demo/stitch/).\n', > '\n', > '\n', > '```python\n', > 'from pylab import *\n', > 'import scipy.signal as signal\n', > ' \n', > '#Plot frequency and phase response\n', > 'def mfreqz(b,a=1):\n', > ' w,h = signal.freqz(b,a)\n', > ' h_dB = 20 * log10 (abs(h))\n', > ' subplot(211)\n', > ' plot(w/max(w),h_dB)\n', > ' ylim(-150, 5)\n', > " ylabel('Magnitude (db)')\n", > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n", > " title(r'Frequency response')\n", > ' subplot(212)\n', > ' h_Phase = unwrap(arctan2(imag(h),real(h)))\n', > ' plot(w/max(w),h_Phase)\n', > " ylabel('Phase (radians)')\n", > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n", > " title(r'Phase response')\n", > ' subplots_adjust(hspace=0.5)\n', > '\n', > '#Plot step and impulse response\n', > 'def impz(b,a=1):\n', > ' l = len(b)\n', > ' impulse = repeat(0.,l); impulse[0] =1.\n', > ' x = arange(0,l)\n', > ' response = signal.lfilter(b,a,impulse)\n', > ' subplot(211)\n', > ' stem(x, response)\n', > " ylabel('Amplitude')\n", > " xlabel(r'n (samples)')\n", > " title(r'Impulse response')\n", > ' subplot(212)\n', > ' step = cumsum(response)\n', > ' stem(x, step)\n', > " ylabel('Amplitude')\n", > " xlabel(r'n (samples)')\n", > " title(r'Step response')\n", > ' subplots_adjust(hspace=0.5)\n', > '```\n', > '\n', > '\n', > '\n', > '## Lowpass FIR filter\n', > '\n', > 'Designing a lowpass FIR filter is very simple to do with SciPy, all you\n', > 'need to do is to define the window length, cut off frequency and the\n', > 'window.\n', > '\n', > 'The Hamming window is defined as:\n', > '$w(n) = \\alpha - \\beta\\cos\\frac{2\\pi n}{N-1}$, where $\\alpha=0.54$ and ' > '$\\beta=0.46$ \n', > '\n', > 'The next code chunk is executed in term mode, see the [Python ' > 'script](FIR_design.py) for syntax.\n', > 'Notice also that Pweave can now catch multiple figures/code chunk.\n', > '\n', > '\n', > '\n', > '![Bandpass FIR filter.](figures/simple_figure2_1.png)\n', > '\n'] >msg = None >second = ('% FIR filter design with Python and SciPy\n' > '% Matti Pastell\n' > '% 15th April 2013\n' > '\n' > '# Introduction\n' > '\n' > 'This an example of a script that can be published using\n' > '[Pweave](http://mpastell.com/pweave). The script can be executed\n' > 'normally using Python or published to HTML with Pweave\n' > 'Text is written in markdown in lines starting with "`#\'` " and code\n' > 'is executed and results are included in the published document.\n' > 'The concept is similar to\n' > 'publishing documents with [MATLAB](http://mathworks.com) or using\n' > 'stitch with [Knitr](http://http://yihui.name/knitr/demo/stitch/).\n' > '\n' > '\n' > '```python\n' > 'from pylab import *\n' > 'import scipy.signal as signal\n' > ' \n' > '#Plot frequency and phase response\n' > 'def mfreqz(b,a=1):\n' > ' w,h = signal.freqz(b,a)\n' > ' h_dB = 20 * log10 (abs(h))\n' > ' subplot(211)\n' > ' plot(w/max(w),h_dB)\n' > ' ylim(-150, 5)\n' > " ylabel('Magnitude (db)')\n" > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n" > " title(r'Frequency response')\n" > ' subplot(212)\n' > ' h_Phase = unwrap(arctan2(imag(h),real(h)))\n' > ' plot(w/max(w),h_Phase)\n' > " ylabel('Phase (radians)')\n" > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n" > " title(r'Phase response')\n" > ' subplots_adjust(hspace=0.5)\n' > '\n' > '#Plot step and impulse response\n' > 'def impz(b,a=1):\n' > ' l = len(b)\n' > ' impulse = repeat(0.,l); impulse[0] =1.\n' > ' x = arange(0,l)\n' > ' response = signal.lfilter(b,a,impulse)\n' > ' subplot(211)\n' > ' stem(x, response)\n' > " ylabel('Amplitude')\n" > " xlabel(r'n (samples)')\n" > " title(r'Impulse response')\n" > ' subplot(212)\n' > ' step = cumsum(response)\n' > ' stem(x, step)\n' > " ylabel('Amplitude')\n" > " xlabel(r'n (samples)')\n" > " title(r'Step response')\n" > ' subplots_adjust(hspace=0.5)\n' > '```\n' > '\n' > '\n' > '\n' > '## Lowpass FIR filter\n' > '\n' > 'Designing a lowpass FIR filter is very simple to do with SciPy, all you\n' > 'need to do is to define the window length, cut off frequency and the\n' > 'window.\n' > '\n' > 'The Hamming window is defined as:\n' > '$w(n) = \\alpha - \\beta\\cos\\frac{2\\pi n}{N-1}$, where $\\alpha=0.54$ and ' > '$\\beta=0.46$ \n' > '\n' > 'The next code chunk is executed in term mode, see the [Python ' > 'script](FIR_design.py) for syntax.\n' > 'Notice also that Pweave can now catch multiple figures/code chunk.\n' > '\n' > '\n' > '\n' > '\n') >secondlines = ['% FIR filter design with Python and SciPy\n', > '% Matti Pastell\n', > '% 15th April 2013\n', > '\n', > '# Introduction\n', > '\n', > 'This an example of a script that can be published using\n', > '[Pweave](http://mpastell.com/pweave). The script can be executed\n', > 'normally using Python or published to HTML with Pweave\n', > 'Text is written in markdown in lines starting with "`#\'` " and code\n', > 'is executed and results are included in the published document.\n', > 'The concept is similar to\n', > 'publishing documents with [MATLAB](http://mathworks.com) or using\n', > 'stitch with [Knitr](http://http://yihui.name/knitr/demo/stitch/).\n', > '\n', > '\n', > '```python\n', > 'from pylab import *\n', > 'import scipy.signal as signal\n', > ' \n', > '#Plot frequency and phase response\n', > 'def mfreqz(b,a=1):\n', > ' w,h = signal.freqz(b,a)\n', > ' h_dB = 20 * log10 (abs(h))\n', > ' subplot(211)\n', > ' plot(w/max(w),h_dB)\n', > ' ylim(-150, 5)\n', > " ylabel('Magnitude (db)')\n", > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n", > " title(r'Frequency response')\n", > ' subplot(212)\n', > ' h_Phase = unwrap(arctan2(imag(h),real(h)))\n', > ' plot(w/max(w),h_Phase)\n', > " ylabel('Phase (radians)')\n", > " xlabel(r'Normalized Frequency (x$\\pi$rad/sample)')\n", > " title(r'Phase response')\n", > ' subplots_adjust(hspace=0.5)\n', > '\n', > '#Plot step and impulse response\n', > 'def impz(b,a=1):\n', > ' l = len(b)\n', > ' impulse = repeat(0.,l); impulse[0] =1.\n', > ' x = arange(0,l)\n', > ' response = signal.lfilter(b,a,impulse)\n', > ' subplot(211)\n', > ' stem(x, response)\n', > " ylabel('Amplitude')\n", > " xlabel(r'n (samples)')\n", > " title(r'Impulse response')\n", > ' subplot(212)\n', > ' step = cumsum(response)\n', > ' stem(x, step)\n', > " ylabel('Amplitude')\n", > " xlabel(r'n (samples)')\n", > " title(r'Step response')\n", > ' subplots_adjust(hspace=0.5)\n', > '```\n', > '\n', > '\n', > '\n', > '## Lowpass FIR filter\n', > '\n', > 'Designing a lowpass FIR filter is very simple to do with SciPy, all you\n', > 'need to do is to define the window length, cut off frequency and the\n', > 'window.\n', > '\n', > 'The Hamming window is defined as:\n', > '$w(n) = \\alpha - \\beta\\cos\\frac{2\\pi n}{N-1}$, where $\\alpha=0.54$ and ' > '$\\beta=0.46$ \n', > '\n', > 'The next code chunk is executed in term mode, see the [Python ' > 'script](FIR_design.py) for syntax.\n', > 'Notice also that Pweave can now catch multiple figures/code chunk.\n', > '\n', > '\n', > '\n', > '\n'] >self = <tests.test_pweave.WeaveTest testMethod=testSimple> >standardMsg = ("'% FI[2184 chars]n\\n\\n![Bandpass FIR " > "filter.](figures/simple_figure2_1.png)\\n\\n' != '% FI[2184 " > "chars]n\\n\\n\\n'\n" > 'Diff is 2293 characters long. Set self.maxDiff to None to see it.') > >/usr/lib/python3.8/unittest/case.py:1292: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <tests.test_pweave.WeaveTest testMethod=testSimple> >msg = "'% FI[2184 chars]n\\n\\n![Bandpass FIR filter.](figures/simple_figure2_1.png)\\n\\n' != '% FI[2184 chars]n\\n\\n\\n'\nDiff is 2293 characters long. Set self.maxDiff to None to see it." > > def fail(self, msg=None): > """Fail immediately, with the given message.""" >> raise self.failureException(msg) >E AssertionError: '% FI[2184 chars]n\n\n![Bandpass FIR filter.](figures/simple_figure2_1.png)\n\n' != '% FI[2184 chars]n\n\n\n' >E Diff is 2293 characters long. Set self.maxDiff to None to see it. > >msg = ("'% FI[2184 chars]n\\n\\n![Bandpass FIR " > "filter.](figures/simple_figure2_1.png)\\n\\n' != '% FI[2184 " > "chars]n\\n\\n\\n'\n" > 'Diff is 2293 characters long. Set self.maxDiff to None to see it.') >self = <tests.test_pweave.WeaveTest testMethod=testSimple> > >/usr/lib/python3.8/unittest/case.py:753: AssertionError > >During handling of the above exception, another exception occurred: > >self = <tests.test_pweave.WeaveTest testMethod=testSimple> > > def testMethod(self): > self.TESTDIR = os.path.join('weave', doctype) > infile = self.absPathTo(filename + 'w') > self.setNewOutfile(filename) > > pweave.weave(infile, doctype=doctype, > output=self.absPathTo(filename), > **kwargs) > > basename, _, ext = filename.rpartition('.') > self.REFERENCE = self.absPathTo(basename + '_REF.' + ext) >> self.assertSameAsReference() > >_ = '.' >basename = 'simple' >doctype = 'pandoc' >ext = 'md' >filename = 'simple.md' >infile = '/var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/weave/pandoc/simple.mdw' >kwargs = {} >self = <tests.test_pweave.WeaveTest testMethod=testSimple> > >tests/test_pweave.py:31: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <tests.test_pweave.WeaveTest testMethod=testSimple>, reference = None > > def assertSameAsReference(self, reference=None): > try: > self.assertEqual(self.contentOf(reference if reference is not None else self.REFERENCE), > self.contentOf(self.OUTFILE)) > except AssertionError: >> raise AssertionError("{ref} and {out} differs\ntry:\n$ vimdiff {ref} {out}".format( > ref=self.absPathTo(self.REFERENCE), > out=self.absPathTo(self.OUTFILE))) >E AssertionError: /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/weave/pandoc/simple_REF.md and /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/weave/pandoc/simple.md differs >E try: >E $ vimdiff /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/weave/pandoc/simple_REF.md /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/weave/pandoc/simple.md > >reference = None >self = <tests.test_pweave.WeaveTest testMethod=testSimple> > >tests/_frameworkForTests.py:37: AssertionError >----------------------------- Captured stdout call ----------------------------- >status >Processing chunk 1 named None from line 56 >Processing chunk 2 named None from line 76 >Weaved /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/weave/pandoc/simple.mdw to /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/weave/pandoc/simple.md >=============================== warnings summary =============================== >pweave/__init__.py:47 > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/__init__.py:47: SyntaxWarning: "is not" with a literal. Did you mean "!="? > assert file != "" is not None, "No input specified" > >pweave/readers.py:362 > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/readers.py:362: DeprecationWarning: invalid escape sequence \. > self.basename = re.split("\.+[^\.]+$", file)[0] + "_converted" > >pweave/readers.py:364 > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/readers.py:364: DeprecationWarning: invalid escape sequence \. > self.basename = re.split("\.+[^\.]+$", file)[0] > >pweave/readers.py:422 > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/readers.py:422: DeprecationWarning: invalid escape sequence \. > self.basename = re.split("\.+[^\.]+$", file)[0] + "_converted" > >pweave/readers.py:424 > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/readers.py:424: DeprecationWarning: invalid escape sequence \. > self.basename = re.split("\.+[^\.]+$", file)[0] > >pweave/formatters/tex.py:14 > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/formatters/tex.py:14: DeprecationWarning: invalid escape sequence \e > codeend='\end{verbatim}\n', > >pweave/formatters/tex.py:16 > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/formatters/tex.py:16: DeprecationWarning: invalid escape sequence \e > outputend='\end{verbatim}\n', > >pweave/formatters/tex.py:41 > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/formatters/tex.py:41: DeprecationWarning: invalid escape sequence \l > result += "\label{fig:%s}\n" % chunk['name'] > >pweave/formatters/tex.py:57 > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/formatters/tex.py:57: DeprecationWarning: invalid escape sequence \e > codeend='\end{minted}\n', > >pweave/formatters/tex.py:59 > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/formatters/tex.py:59: DeprecationWarning: invalid escape sequence \e > outputend='\end{minted}\n', > >pweave/formatters/tex.py:61 > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/formatters/tex.py:61: DeprecationWarning: invalid escape sequence \e > termend='\end{minted}\n', > >pweave/formatters/tex.py:97 > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/formatters/tex.py:97: DeprecationWarning: invalid escape sequence \s > LatexFormatter(verboptions="frame=single,fontsize=\small, xleftmargin=0.5em")) > >pweave/formatters/tex.py:107 > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/formatters/tex.py:107: DeprecationWarning: invalid escape sequence \e > codeend='\end{pweavecode}\n', > >pweave/formatters/tex.py:109 > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/formatters/tex.py:109: DeprecationWarning: invalid escape sequence \e > outputend='\end{pweaveout}\n', > >pweave/formatters/tex.py:111 > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/formatters/tex.py:111: DeprecationWarning: invalid escape sequence \e > termend='\end{pweaveterm}\n', > >pweave/formatters/base.py:297 > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/formatters/base.py:297: DeprecationWarning: invalid escape sequence \/ > return "".join(i for i in fname if i not in "\/:*?<>|") > >../../../../../../../usr/lib/python3.8/site-packages/nbconvert/exporters/html.py:100 > /usr/lib/python3.8/site-packages/nbconvert/exporters/html.py:100: DeprecationWarning: 'contextfilter' is renamed to 'pass_context', the old name will be removed in Jinja 3.1. > def markdown2html(self, context, source): > >pweave/formatters/publish.py:180 > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/formatters/publish.py:180: DeprecationWarning: invalid escape sequence \p > self.header = ("""\\documentclass[a4paper,11pt,final]{article} > >pweave/formatters/publish.py:246 > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/formatters/publish.py:246: DeprecationWarning: invalid escape sequence \m > self.subheader += "\maketitle\n" > >pweave/processors/base.py:237 > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/processors/base.py:237: DeprecationWarning: invalid escape sequence \w > splitted = re.split('(<%[\w\s\W]*?%>)', content) # , flags = re.S) > >pweave/processors/base.py:264 > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/processors/base.py:264: DeprecationWarning: invalid escape sequence \w > splitted = re.split('<%[\w\s\W]*?%>', chunk['content']) > >../../../../../../../usr/lib/python3.8/site-packages/IPython/core/inputsplitter.py:21 > /usr/lib/python3.8/site-packages/IPython/core/inputsplitter.py:21: DeprecationWarning: IPython.core.inputsplitter is deprecated since IPython 7 in favor of `IPython.core.inputtransformer2` > warn('IPython.core.inputsplitter is deprecated since IPython 7 in favor of `IPython.core.inputtransformer2`', > >tests/test_cache.py::test_cache > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/themes/bootstrap.py:1: DeprecationWarning: invalid escape sequence \e > css = u"""/*! > >tests/test_cache.py::test_cache > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/themes/cerulean.py:2: DeprecationWarning: invalid escape sequence \e > css = u""" > >tests/test_cache.py::test_cache > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/themes/journal.py:1: DeprecationWarning: invalid escape sequence \e > css = u""" > >tests/test_cache.py::test_cache > /usr/lib/python3.8/site-packages/ipyparallel/client/view.py:8: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses > import imp > >tests/test_cache.py::test_cache >tests/test_cache.py::test_cache >tests/test_pweave.py::WeaveTest::testClassInMultipleChunksUsingContinueOption >tests/test_pweave.py::WeaveTest::testFIR_FilterExampleTex >tests/test_pweave.py::WeaveTest::testInlineCode >tests/test_pweave.py::WeaveTest::testSimple >tests/test_pweave.py::WeaveTest::testWrapAndCodeOutput >tests/test_readers.py::test_markdown > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/processors/jupyter.py:34: ResourceWarning: unclosed file <_io.TextIOWrapper name='/dev/null' mode='w' encoding='UTF-8'> > km.start_kernel(cwd=path, stderr=open(os.devnull, 'w')) > >tests/test_cache.py: 5 warnings >tests/test_pweave.py: 15 warnings >tests/test_readers.py: 1 warning > /usr/lib/python3.8/site-packages/jupyter_client/session.py:809: DeprecationWarning: Accessing zmq Socket attribute recv_multipart on BackgroundSocket > msg_list = socket.recv_multipart(mode, copy=copy) > >tests/test_cache.py: 5 warnings >tests/test_pweave.py: 12 warnings >tests/test_readers.py: 1 warning > /usr/lib/python3.8/site-packages/ipykernel/ipkernel.py:283: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above. > and should_run_async(code) > >tests/test_cache.py::test_cache > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/formatters/markdownmath.py:12: DeprecationWarning: invalid escape sequence \[ > node.text = markdown.util.AtomicString("\[" + m.group(3) + "\]") > >tests/test_cache.py::test_cache > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/formatters/markdownmath.py:12: DeprecationWarning: invalid escape sequence \] > node.text = markdown.util.AtomicString("\[" + m.group(3) + "\]") > >tests/test_cache.py::test_cache > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/formatters/markdownmath.py:14: DeprecationWarning: invalid escape sequence \( > node.text = markdown.util.AtomicString("\(" + m.group(3) + "\)") > >tests/test_cache.py::test_cache > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/formatters/markdownmath.py:14: DeprecationWarning: invalid escape sequence \) > node.text = markdown.util.AtomicString("\(" + m.group(3) + "\)") > >tests/test_cache.py::test_cache > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/pweave/formatters/markdownmath.py:21: DeprecationWarning: Using the add method to register a processor or pattern is deprecated. Use the `register` method instead. > md.inlinePatterns.add('math', MathPattern(), '<escape') > >tests/test_cache.py::test_cache > /usr/lib/python3.8/site-packages/markdown/core.py:125: DeprecationWarning: The 'md_globals' parameter of 'pweave.formatters.markdownmath.MathExtension.extendMarkdown' is deprecated. > ext._extendMarkdown(self) > >tests/test_cache.py::test_cache > /usr/lib/python3.8/site-packages/nbconvert/filters/ansi.py:60: DeprecationWarning: 'jinja2.escape' is deprecated and will be removed in Jinja 3.1. Import 'markupsafe.escape' instead. > text = jinja2.utils.escape(text) > >tests/test_cache.py::test_cache > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/test_cache.py:9: ResourceWarning: unclosed file <_io.TextIOWrapper name='tests/processors/processor_cache_ref.md' mode='r' encoding='UTF-8'> > assertSameContent("tests/processors/processor_test.md", "tests/processors/processor_cache_ref.md") > >tests/test_cache.py::test_cache > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/test_cache.py:9: ResourceWarning: unclosed file <_io.TextIOWrapper name='tests/processors/processor_test.md' mode='r' encoding='UTF-8'> > assertSameContent("tests/processors/processor_test.md", "tests/processors/processor_cache_ref.md") > >tests/test_readers.py::test_markdown > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/test_readers.py:6: ResourceWarning: unclosed file <_io.TextIOWrapper name='tests/readers/markdown_reader_ref.md' mode='r' encoding='UTF-8'> > assertSameContent("tests/readers/markdown_reader.md", "tests/readers/markdown_reader_ref.md") > >tests/test_readers.py::test_markdown > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/test_readers.py:6: ResourceWarning: unclosed file <_io.TextIOWrapper name='tests/readers/markdown_reader.md' mode='r' encoding='UTF-8'> > assertSameContent("tests/readers/markdown_reader.md", "tests/readers/markdown_reader_ref.md") > >tests/test_readers.py::test_script > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/test_readers.py:12: ResourceWarning: unclosed file <_io.TextIOWrapper name='tests/publish/publish_test_REF.py' mode='r' encoding='UTF-8'> > assertSameContent("tests/publish/publish_test.py", > >tests/test_readers.py::test_script > /var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3/tests/test_readers.py:12: ResourceWarning: unclosed file <_io.TextIOWrapper name='tests/publish/publish_test.py' mode='r' encoding='UTF-8'> > assertSameContent("tests/publish/publish_test.py", > >-- Docs: https://docs.pytest.org/en/stable/warnings.html >=========================== short test summary info ============================ >FAILED tests/test_pweave.py::WeaveTest::testClassInMultipleChunksUsingContinueOption >FAILED tests/test_pweave.py::WeaveTest::testFIR_FilterExampleTex - AssertionE... >FAILED tests/test_pweave.py::WeaveTest::testSimple - AssertionError: /var/tmp... >=================== 3 failed, 7 passed, 86 warnings in 5.26s =================== > * ERROR: dev-python/pweave-0.30.3-r1::gentoo failed (test phase): > * pytest failed with python3.8 > * > * Call stack: > * ebuild.sh, line 127: Called src_test > * environment, line 3067: Called distutils-r1_src_test > * environment, line 1329: Called _distutils-r1_run_foreach_impl 'python_test' > * environment, line 556: Called python_foreach_impl 'distutils-r1_run_phase' 'python_test' > * environment, line 2709: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' > * environment, line 2169: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' > * environment, line 2167: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_test' > * environment, line 885: Called distutils-r1_run_phase 'python_test' > * environment, line 1268: Called python_test > * environment, line 3008: Called distutils-r1_python_test > * environment, line 1225: Called epytest > * environment, line 1687: Called die > * The specific snippet of code: > * "${@}" || die -n "pytest failed with ${EPYTHON}"; > * > * If you need support, post the output of `emerge --info '=dev-python/pweave-0.30.3-r1::gentoo'`, > * the complete build log and the output of `emerge -pqv '=dev-python/pweave-0.30.3-r1::gentoo'`. > * The complete build log is located at '/var/log/emerge-log/build/dev-python/pweave-0.30.3-r1:20210708-122705.log'. > * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-python/pweave-0.30.3-r1/temp/build.log'. > * The ebuild environment file is located at '/var/tmp/portage/dev-python/pweave-0.30.3-r1/temp/environment'. > * Working directory: '/var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3' > * S: '/var/tmp/portage/dev-python/pweave-0.30.3-r1/work/Pweave-0.30.3' >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 801205
: 722734