GithubHelp home page GithubHelp logo

memmett / pyweno Goto Github PK

View Code? Open in Web Editor NEW
35.0 35.0 14.0 2.46 MB

PyWENO is a Python implementation of one-dimensional Weighted Essentially Non-oscillatory (WENO) reconstructions.

Home Page: http://readthedocs.org/docs/pyweno/en/latest

License: Other

Python 2.53% Shell 0.01% C 97.47%

pyweno's People

Contributors

alexfikl avatar memmett avatar tbenthompson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pyweno's Issues

'module pyweno not found'

I've cloned the repository and followed the three steps for PyWENO instalaltion, but after import numpy and import sympy, the command import pyweno lead to the following error:

>>> import pyweno Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named pyweno

Performance: the polynomial routines seems brutally slow.

When the order of reconstruction is high (ie, starting at 5 or so), PyWENO takes a very long time (and consumes a lot of memory) to generate the various reconstruction coefficients etc. I don't recall this always being the case...

pip install pyweno fails

I have no idea whether this is a bug or an issue with my system, but I tried to pip install pyweno and got the following error:

building 'pyweno.cnonuniform' extension

/usr/bin/clang -fno-strict-aliasing -I/Users/ketch/anaconda/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/ketch/anaconda/lib/python2.7/site-packages/numpy/core/include -I/Users/ketch/anaconda/include/python2.7 -c src/nfweno.c -o build/temp.macosx-10.5-x86_64-2.7/src/nfweno.o -std=c99

In file included from src/nfweno.c:24:

In file included from /Users/ketch/anaconda/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17:

In file included from /Users/ketch/anaconda/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1761:

/Users/ketch/anaconda/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by "          "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]

#warning "Using deprecated NumPy API, disable it by " \

 ^

src/nfweno.c:30:10: fatal error: 'nfweno.h' file not found

#include "nfweno.h"

         ^

1 warning and 1 error generated.

error: command '/usr/bin/clang' failed with exit status 1

----------------------------------------
Cleaning up...
Command /Users/ketch/anaconda/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/vj/_vxww1410077hy9prp5fgx0r0000gn/T/pip_build_ketch/pyweno/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/vj/_vxww1410077hy9prp5fgx0r0000gn/T/pip-y3lOoh-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/vj/_vxww1410077hy9prp5fgx0r0000gn/T/pip_build_ketch/pyweno
Storing debug log for failure in /Users/ketch/.pip/pip.log

no module pyweno.c

The pyweno code in codegen.py in PyClaw tries to import pyweno.c. As far as I can tell, that doesn't exist in the current version of pyweno.

Document weight splitting in symbolic.optimal_weights()

Calling

f=symbolic.optimal_weights(k,(0.2,))
f[0]

gives

{'k': 3,
 'n': 1,
 (0, 0): (0.144615384615376, 0.0723076923076879),
 (0, 1): (0.152307692307692, 0.304615384615384),
 (0, 2): (2.16000000000000, 1.08000000000000)}

which was confusing to me, since each of the dictionary values should be a number, not a tuple. I only realized what was going on after inspecting the code; it automatically gives splittings when weights become negative. It would be nice to document this and show how the return values should be used.

pip install fail

On archlinux

pip install pyweno -v

Using pip 22.3.1 from /usr/lib/python3.10/site-packages/pip (python 3.10)
Defaulting to user installation because normal site-packages is not writeable
Collecting pyweno
Using cached PyWENO-0.11.2.tar.gz (195 kB)
Running command python setup.py egg_info
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/tmp/pip-install-8mly5v3e/pyweno_ffd4128001654af2bd11705c47263fe2/setup.py", line 16, in
execfile('version.py') # this sets 'version'
NameError: name 'execfile' is not defined
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /usr/bin/python -c '
exec(compile('"'"''"'"''"'"'

This is -- a caller that pip uses to run setup.py

- It imports setuptools before invoking setup.py, to enable projects that directly

import from distutils.core to work with newer packaging standards.

- It provides a clear error message when setuptools is not installed.

- It sets sys.argv[0] to the underlying setup.py, when invoking setup.py so

setuptools doesn'"'"'t think the script is -c. This avoids the following warning:

manifest_maker: standard file '"'"'-c'"'"' not found".

- It generates a shim setup.py, for handling setup.cfg-only projects.

import os, sys, tokenize

try:
import setuptools
except ImportError as error:
print(
"ERROR: Can not execute setup.py since setuptools is not available in "
"the build environment.",
file=sys.stderr,
)
sys.exit(1)

file = %r
sys.argv[0] = file

if os.path.exists(file):
filename = file
with tokenize.open(file) as f:
setup_py_code = f.read()
else:
filename = ""
setup_py_code = "from setuptools import setup; setup()"

exec(compile(setup_py_code, filename, "exec"))
'"'"''"'"''"'"' % ('"'"'/tmp/pip-install-8mly5v3e/pyweno_ffd4128001654af2bd11705c47263fe2/setup.py'"'"',), "", "exec"))' egg_info --egg-base /tmp/pip-pip-egg-info-oeunrfiz
cwd: /tmp/pip-install-8mly5v3e/pyweno_ffd4128001654af2bd11705c47263fe2/
Preparing metadata (setup.py) ... error
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.