小编Dav*_*idS的帖子

在numpy数组Python中提取列的特定RANGE

我有一个数组:

e = np.array([[ 0,  1,  2,  3, 5, 6, 7, 8],
              [ 4,  5,  6,  7, 5, 3, 2, 5],
              [ 8,  9, 10, 11, 4, 5, 3, 5]])
Run Code Online (Sandbox Code Playgroud)

我想通过RANGE中的列提取数组,如果我想在范围1到5之间取列,它将返回

e = np.array([[ 1,  2,  3, 5, ],
              [ 5,  6,  7, 5, ],
              [ 9, 10, 11, 4, ]])
Run Code Online (Sandbox Code Playgroud)

怎么解决?谢谢

python arrays numpy python-2.7

9
推荐指数
2
解决办法
3万
查看次数

Problems on creation of executable file from python with Nuitka

I am trying to create an exe file from a python file that it will be executable to other PCs. I came across Nuitka.I use Python 2.7.11 Anaconda 2.3.0 (32 bit) on Windows 8.1 64 bit. Because of my work specs i can't update my Python version!!! I have download nuitka 0.5.19 for python 2.7. At first i used the simple line nuitka --exe python.py and i get an executable (with some warnings) that runs only in PCs that had …

python exe python-2.7 nuitka

6
推荐指数
1
解决办法
1327
查看次数

Tkinter中的七段显示

我正在尝试使用Tkinter和Python 2.7创建GUI。它必须具有七段显示或类似于根据变量动态显示值的内容。除了手动图形设计之外,还有什么方法可以创建七段式显示器(这会减慢整个系统的速度)?

python tkinter python-2.7

2
推荐指数
1
解决办法
1908
查看次数

如何在忽略大小写的情况下按键对字典进行排序?

我使用以下代码对我的字典进行排序:

meaningHash = {'Banana': 'fruit', 'apple': 'fruit'}
sortedMeaningHash = collections.OrderedDict(sorted(meaningHash.items()))
print sortedMeaningHash
Run Code Online (Sandbox Code Playgroud)

结果是:

OrderedDict([('Banana', 'fruit'), ('apple', 'fruit')])
Run Code Online (Sandbox Code Playgroud)

而期望的输出是:

OrderedDict([('apple', 'fruit'), ('Banana', 'fruit')])
Run Code Online (Sandbox Code Playgroud)

python hash dictionary python-2.7

0
推荐指数
1
解决办法
119
查看次数

标签 统计

python ×4

python-2.7 ×4

arrays ×1

dictionary ×1

exe ×1

hash ×1

nuitka ×1

numpy ×1

tkinter ×1