import numpy as np
a = np.array([[1,9],[2,9],[3,9],[4,9],[5,9],[6,9],[7,9],[8,9]])
b = np.array([[]])
print(a)
for i in range(len(a)):
if i > 0 and i % 2 == 0:
b = np.append(b, a[i, 0] - a[i-2, 0])
else:
b = np.append(b, 0)
print(b.shape)
b = b.reshape(b.shape[0], 1)
print(b)
c = np.concatenate((a,b), axis=1)
print(c)
aW1wb3J0IG51bXB5IGFzIG5wCgphID0gbnAuYXJyYXkoW1sxLDldLFsyLDldLFszLDldLFs0LDldLFs1LDldLFs2LDldLFs3LDldLFs4LDldXSkKYiA9IG5wLmFycmF5KFtbXV0pCnByaW50KGEpCgpmb3IgaSBpbiByYW5nZShsZW4oYSkpOgoJaWYgaSA+IDAgYW5kIGkgJSAyID09IDA6CgkJYiA9IG5wLmFwcGVuZChiLCBhW2ksIDBdIC0gYVtpLTIsIDBdKQoJZWxzZToKCQliID0gbnAuYXBwZW5kKGIsIDApCgpwcmludChiLnNoYXBlKQoKYiA9IGIucmVzaGFwZShiLnNoYXBlWzBdLCAxKQoKcHJpbnQoYikKCmMgPSBucC5jb25jYXRlbmF0ZSgoYSxiKSwgYXhpcz0xKQoKcHJpbnQoYyk=