質問編集履歴

2

初心者アイコンを付けました

2016/12/09 09:18

投稿

philo-sophia
philo-sophia

スコア6

test CHANGED
File without changes
test CHANGED
File without changes

1

コードに誤りがあったので修正しました

2016/12/09 09:18

投稿

philo-sophia
philo-sophia

スコア6

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,6 @@
1
1
  ###前提・実現したいこと
2
2
 
3
- python3.5を使い、NumPyとmatplotlibをimportして、コマンドプロンプトでステップ関数、シグモイド関数のグラフを書きたいです。
3
+ python3.5を使い、NumPyとmatplotlibをimportして、Atomとコマンドプロンプトでステップ関数、シグモイド関数のグラフを書きたいです。
4
4
 
5
5
  初心者です。
6
6
 
@@ -22,11 +22,13 @@
22
22
 
23
23
  ②コマンドプロンプトに直接打ち込んだ時
24
24
 
25
- File "<stdin>", line 2
26
25
 
27
- y=x>0
28
26
 
27
+ File "<stdin>", line 2
28
+
29
+ return np.array(x>0,dtype=np.int)
30
+
29
- ^
31
+ ^
30
32
 
31
33
  IndentationError: expected an indented block
32
34
 
@@ -98,7 +100,9 @@
98
100
 
99
101
  >>> def step_function(x):
100
102
 
101
- ... y=x>0
103
+ ... return np.array(x>0,dtype=np.int)
104
+
105
+
102
106
 
103
107
  この時点でエラーでした
104
108