Code Monkey home page Code Monkey logo

intvalpy's Introduction

Visitor count

intvalpy's People

Contributors

androsovas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

intvalpy's Issues

not able to plot polytope

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.

Направленные округления

Необходимо реализовать направленные округления, которые при желании можно отключать (для ускорения работы алгоритмов).

Лишние np.array при __setitem__

При срабатывания 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 для интервала

Было бы удобно иметь в пакете dtype который можно использовать при конструкции numpy массивов и для других пакетов поддерживающих dtype типизацию.
В моем случае я хотел создать разреженную матрицу в scipy для хранения интервалов. Но тот же scipy не поддерживает стандартный python объект как dtype (так как разреженные матрицы могут быть очень большими у них применяются различные техники для сжатия данных, реализация таких техник в контексте ванильного питон объекта невозможна)

Создание интервалов

Добавить возможность создавать интервалы через середину и радиус, или через задание одного массива.

Обозначение повышенной точности

В текущий момент используется термин increased precision. Однако существует определение extended precision, которое соответсвует стандарту IEEE 754-2008.

Tol() takes no arguments

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

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.