仅搜索python中矩阵的一部分

时间:2017-06-19 21:46:57

标签: python numpy search matrix

我有一个对称矩阵,我很好奇是否可以使用np.where搜索矩阵的上三角部分。也就是说,有没有办法用循环或函数删除矩阵的下三角形部分,这样我就可以用np.where搜索矩阵的上三角形部分?

1 个答案:

答案 0 :(得分:1)

06-21 10:51:07.464 26640-26640/com.hatchbaby.rest.qa I/Nightlight: [main] Disconnecting: Nightlight.disconnect()
06-21 10:51:07.528 26640-26640/com.hatchbaby.rest.qa D/BluetoothGatt: setCharacteristicNotification() - uuid: 02240003-5efd-47eb-9c1a-de53f7a2b232 enable: false
06-21 10:51:07.538 26640-26640/com.hatchbaby.rest.qa D/RxBle#Radio:   QUEUED RxBleRadioOperationDescriptorWrite(131621266)
06-21 10:51:07.539 26640-26690/com.hatchbaby.rest.qa D/RxBle#Radio:  STARTED RxBleRadioOperationDescriptorWrite(131621266)
06-21 10:51:07.543 26640-26640/com.hatchbaby.rest.qa D/BluetoothGatt: setCharacteristicNotification() - uuid: 02260002-5efd-47eb-9c1a-de53f7a2b232 enable: false
06-21 10:51:07.547 26640-26640/com.hatchbaby.rest.qa D/RxBle#Radio:   QUEUED RxBleRadioOperationDescriptorWrite(250764313)
06-21 10:51:07.548 26640-26640/com.hatchbaby.rest.qa D/RxBle#Radio:   QUEUED RxBleRadioOperationDisconnect(160892126)
06-21 10:51:07.562 26640-26640/com.hatchbaby.rest.qa I/Nightlight: [main] Nightlight state: RxBleConnectionState{DISCONNECTED}
06-21 10:51:07.686 26640-26747/com.hatchbaby.rest.qa D/RxBle#BluetoothGatt: onDescriptorWrite descriptor=00002902-0000-1000-8000-00805f9b34fb status=0
06-21 10:51:07.688 26640-26690/com.hatchbaby.rest.qa D/RxBle#Radio: FINISHED RxBleRadioOperationDescriptorWrite(131621266)
06-21 10:51:07.689 26640-26690/com.hatchbaby.rest.qa D/RxBle#Radio:  STARTED RxBleRadioOperationDescriptorWrite(250764313)
06-21 10:51:07.783 26640-26746/com.hatchbaby.rest.qa D/RxBle#BluetoothGatt: onDescriptorWrite descriptor=00002902-0000-1000-8000-00805f9b34fb status=0
06-21 10:51:07.786 26640-26690/com.hatchbaby.rest.qa D/RxBle#Radio: FINISHED RxBleRadioOperationDescriptorWrite(250764313)
06-21 10:51:07.787 26640-26690/com.hatchbaby.rest.qa D/RxBle#Radio:  STARTED RxBleRadioOperationDisconnect(160892126)
06-21 10:51:07.787 26640-26640/com.hatchbaby.rest.qa D/BluetoothManager: getConnectionState()
06-21 10:51:07.787 26640-26640/com.hatchbaby.rest.qa D/BluetoothManager: getConnectedDevices
06-21 10:51:07.793 26640-26640/com.hatchbaby.rest.qa D/BluetoothGatt: cancelOpen() - device: E5:D6:FC:68:FB:55
06-21 10:51:07.797 26640-26653/com.hatchbaby.rest.qa D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=6 device=E5:D6:FC:68:FB:55
06-21 10:51:07.797 26640-26653/com.hatchbaby.rest.qa D/RxBle#BluetoothGatt: onConnectionStateChange newState=0 status=0
06-21 10:51:07.803 26640-26640/com.hatchbaby.rest.qa D/BluetoothGatt: close()
06-21 10:51:07.803 26640-26640/com.hatchbaby.rest.qa D/BluetoothGatt: unregisterApp() - mClientIf=6
06-21 10:51:07.807 26640-26690/com.hatchbaby.rest.qa D/RxBle#Radio: FINISHED RxBleRadioOperationDisconnect(160892126)