## Install prerequisites (rhel) yum install numpy python-devel python-wheel python-mock ## Install Bazel wget https://github.com/bazelbuild/bazel/rele... ...
分类:
其他好文 时间:
2017-09-04 16:54:29
阅读次数:
501
<class 'numpy.ndarray'> (5,) [1 2 3 4 5] <class 'numpy.ndarray'> (6,) [1 2 3 4 5 6] <class 'numpy.ndarray'> (2, 5) [[ 1 2 3 4 5] [ 6 7 8 9 10]] (2, 5) ...
分类:
其他好文 时间:
2017-09-04 09:52:25
阅读次数:
209
#!/usr/bin/env python # -*- coding: utf-8 -*- from numpy import * """ Code for hierarchical clustering, modified from Programming Collective Intellige... ...
分类:
其他好文 时间:
2017-09-03 22:10:51
阅读次数:
197
import numpy as np# Function: K Means# # K-Means is an algorithm that takes in a dataset and a constant# k and returns k centroids (which define clust ...
分类:
其他好文 时间:
2017-09-03 19:35:13
阅读次数:
194
linspace可以用来实现相同间隔的采样。 numpy.linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None) 返回值为numpy.ndarray。 贴上一个例子: 由于默认情况下endpoint=True,因 ...
分类:
编程语言 时间:
2017-09-03 14:57:36
阅读次数:
340
从上面可以 看出,numpy中的flatten是按照行进行,在按照列,最后按照通道。 就这样子 ...
分类:
其他好文 时间:
2017-09-03 12:18:49
阅读次数:
138
import numpy as np import random def genData(numPoints,bias,variance):#实例 偏好 方差 x = np.zeros(shape=(numPoints,2))#行列 y = np.zeros(shape=(numPoints))#行... ...
分类:
其他好文 时间:
2017-09-02 20:48:45
阅读次数:
131
from numpy import genfromtxt from sklearn import linear_model datapath=r"Delivery_Dummy.csv" data = genfromtxt(datapath,delimiter=",") x = data[1:,:-1... ...
分类:
其他好文 时间:
2017-09-02 19:55:06
阅读次数:
148
这段时间需要部署tensorflow到linux上,由于堡垒机不能连外网,所以pip、apt-get、wget、git统统不能用,然后就是各种调试了,下面整理了一些遇到的问题和解决方案,供大家参考(CentOS/Python3.4),有什么遗漏的问题还望大家补充。 1、Putty、XShell、Se ...
分类:
其他好文 时间:
2017-09-01 23:02:59
阅读次数:
431