androsovas / intvalpy Goto Github PK
View Code? Open in Web Editor NEWIntvalPy - a Python interval computation library
Home Page: https://intvalpy.readthedocs.io
License: MIT License
IntvalPy - a Python interval computation library
Home Page: https://intvalpy.readthedocs.io
License: MIT License
Добавить функцию для отображения брусов данных
Dear Developer
I try to plot a polytope via intvalpy. i face the following error message
IndexError Traceback (most recent call last)
Input In [50], in <cell line: 1>()
----> 1 v=plot_poly3dnew(s2n[0], ax, color ='C1')
Input In [42], in plot_poly3dnew(poly, ax, alpha, color)
35 dim=poly.dim
37 if dim == 3:
---> 38 v = ip.lineqs3D(-poly.A, -poly.b, size=(3,3), show=False)
39 for i in v:
40 x, y, z = i[:,0], i[:,1], i[:,2]
File ~\AppData\Local\Programs\Python\Python39\lib\site-packages\intvalpy\visualization.py:607, in lineqs3D(A, b, show, color, alpha, s, size, bounds)
605 #print("St = BoundaryIntervals(At, bt) ", St)
606 if len(St) > 0:
--> 607 Pt = Intervals2Path(St)
608 P = []
609 for l in range(len(Pt)):
File ~\AppData\Local\Programs\Python\Python39\lib\site-packages\intvalpy\visualization.py:160, in Intervals2Path(S)
158 index = k
159 break
--> 160 es = S[index, 2:4]
162 if np.max(np.abs(bs-es)) > 1e-8:
163 P.append(es)
IndexError: index 3 is out of bounds for axis 0 with size 3
I checked the dimension of polytope and it is 3D polyhedron. I do not know why the BoundaryIntervals failes to creae the facet.
your suggestion will be more helpful to figure out the causes for this problem
any comments is highly appreciated
Thank you
Best regards
Muthu
Researcher
TU freiberg, Germany
Скорректировать вычисление тригонометрических функций с учетом введения полной арифметики Каухера
При вычислении функций sin, cos, exp и т.п., не сохраняется повышенная точность.
Необходимо использовать библиотеку mpmath, а не math.
Необходимо реализовать направленные округления, которые при желании можно отключать (для ускорения работы алгоритмов).
При срабатывания setitem, если присваивается одиночный интервал, создаются лишние np.array
Example:
import intvalpy as ip
test = ip.zeros(2)
test[0] = ip.Interval(2, 3)
test.a
ФР: array([array(mpf('2.0'), dtype=object), mpf('0.0')], dtype=object)
ОР: array([mpf('2.0'), mpf('0.0')], dtype=object)
Было бы удобно иметь в пакете dtype который можно использовать при конструкции numpy массивов и для других пакетов поддерживающих dtype типизацию.
В моем случае я хотел создать разреженную матрицу в scipy для хранения интервалов. Но тот же scipy не поддерживает стандартный python объект как dtype (так как разреженные матрицы могут быть очень большими у них применяются различные техники для сжатия данных, реализация таких техник в контексте ванильного питон объекта невозможна)
Добавить возможность создавать интервалы через середину и радиус, или через задание одного массива.
В текущий момент используется термин increased precision. Однако существует определение extended precision, которое соответсвует стандарту IEEE 754-2008.
Заполнить документацию всеми реализованными функциями.
I took code from the example here https://pypi.org/project/intvalpy/ .
Example:
import intvalpy as ip
A = ip.Interval([
[[2, 4], [-2, 1]],
[[-1, 2], [2, 4]]
])
b = ip.Interval([[-2, 2], [-2, 2]])
tol = ip.linear.Tol(A, b, maxQ=True)
print(tol)
When I try to run it I get an error: "TypeError: Tol() takes no arguments"
Can anyone tell me what is wrong and how to fix it?
Thanks
Необходимо добавить отдельную функцию infinity для работы с бесконечностью, а также решить проблему возникающую при умножение 0 * inf
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.