Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Modified setup.py and control/__init__.py to match numpy.#38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
jgoppert wants to merge1 commit intopython-control:masterfromjgoppert:master
Closed
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletioncontrol/tests/discrete_test.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,7 +5,15 @@

import unittest
import numpy as np
from control import *
from control.statesp import StateSpace
from control import matlab
from control.xferfcn import TransferFunction
from control.lti import isdtime, timebase, isctime, timebaseEqual
from control.dtime import sample_system
from control.bdalg import feedback
from control.timeresp import step_response, impulse_response, forced_response
from control.freqplot import bode


class TestDiscrete(unittest.TestCase):
"""Tests for the DiscreteStateSpace class."""
Expand Down
44 changes: 30 additions & 14 deletionssetup.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,7 +18,7 @@

MAJOR = 0
MINOR = 6
MICRO =5
MICRO =6
ISRELEASED = True
DISTNAME = 'control'
DESCRIPTION = 'Python control systems library'
Expand All@@ -36,15 +36,6 @@
tests_require=['scipy', 'matplotlib', 'nose']
)

VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)

import os
import sys
import subprocess


from setuptools import setup, find_packages

CLASSIFIERS = """\
Development Status :: 3 - Alpha
Intended Audience :: Science/Research
Expand All@@ -60,6 +51,23 @@
Operating System :: MacOS
"""

VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)

import os
import sys
import subprocess
from setuptools import setup, find_packages

# check for python version
if sys.version_info[:2] < (2, 6) or (3, 0) <= sys.version_info[0:2] < (3, 2):
raise RuntimeError("Python version 2.6, 2.7 or >= 3.2 required.")

# use builtins to store if we are running setup
if sys.version_info[0] >= 3:
import builtins
else:
import __builtin__ as builtins


# Return the git revision as a string
def git_version():
Expand DownExpand Up@@ -88,6 +96,12 @@ def _minimal_ext_cmd(cmd):

return GIT_REVISION

# This is a bit hackish: we are setting a global variable so that the main
# numpy __init__ can detect if it is being loaded by the setup routine, to
# avoid attempting to load components that aren't built yet. While ugly, it's
# a lot more robust than what was previously being used.
builtins.__CONTROL_SETUP__ = True


def get_version_info():
# Adding the git rev number needs to be done inside write_version_py(),
Expand All@@ -100,10 +114,12 @@ def get_version_info():
# must be a source distribution, use existing version file
try:
from control.version import git_revision as GIT_REVISION
except ImportError:
raise ImportError("Unable to import git_revision. Try removing "
"control/version.py and the build directory "
"before building.")
except ImportError as e:
raise ImportError(
str(e) +
", Unable to import git_revision. Try removing "
"control/version.py and the build directory "
"before building.")
else:
GIT_REVISION = "Unknown"

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp