ValueError: 'c' argument has 1 elements, which is not acceptable for use with 'x' with size 400, 'y'
在做吳恩達深度學習課程第一課第三週的課後作業時,執行如下程式碼:
plt.scatter(X[0, :], X[1, :], c=Y, s=40, cmap=plt.cm.Spectral)
報錯:
ValueError: 'c' argument has 1 elements, which is not acceptable for use with 'x' with size 400, 'y' with size 400.
這是plt.scatter函式微小的改版造成的,只需要修改如下:
import operator from functools import reduce plt.scatter(X[0, :], X[1, :], c=reduce(operator.add, Y), s=40, cmap=plt.cm.Spectral)
相關推薦
ValueError: 39;c39; argument has 1 elements, which is not acceptable for use with 39;x39; with size 400, 39;y39;
在做吳恩達深度學習課程第一課第三週的課後作業時,執行如下程式碼: plt.scatter(X[0, :], X[1, :], c=Y, s=40, cmap=plt.cm.Spectral) 報錯: ValueError: 'c' argument has 1 elements
Eclipse 39;<>39; operator is not allowed for source level below 1.7
source for nbsp 技術 operator cnblogs eclips 解決方法 src ‘<>‘ operator is not allowed for source level below 1.7 解決方法: Eclipse '
MySQL Strict Mode is not set for database connection 39;default39;
bsp tran sql col set class spa clas log SET GLOBAL sql_mode=‘strict_trans_tables‘; SET sql_mode =‘strict_trans_tables‘; MySQ
The following signatures couldn39;t be verified because the public key is not available 解決方法
upd ack AD ase itl no_pubkey sig TP ubun 今天試圖把 deepin 的軟件源加到我到 Ubuntu 16.04 中去。 在 deepin wiki 上看到一個教程。 在 /etc/apt/sources.list 中加上 deepin
killall doesn39;t kill all and rarely kills, what is the command for then?
轉載自https://askubuntu.com/questions/271028/killall-doesnt-kill-all-and-rarely-kills-what-is-the-command-for-then Q: I occasionally use the kil
appium解決無法通過name屬性識別元素org.openqa.selenium.InvalidSelectorException: Locator Strategy 39;name39; is not supported for this session
執行程式碼、: public AndroidDriver<AndroidElement> appiumDriver; appiumDriver.findElement(By.name("我的")).click(); 報錯如下: 去到appium安裝目錄下,找到appiu
Appium 運行腳本報錯InvalidSelectorException: Message: Locator Strategy 39;css selector39; is not supported for (轉)
解決 cbc support 題解 cat 轉載 LIDS nbsp 重新 現象:Appium運行腳本報錯InvalidSelectorException: Message: Locator Strategy ‘css selector‘ is not supported
加壓壓縮文件報錯gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now
child tdi tex save 重新 屬性 保存 div sta 壓縮包是直接weget 後面加官網上的tar包地址獲取的 [[email protected]/* */ ~]# tar -zxvf /home/hadoop/hadoop-2.6.5-
解壓報錯gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now的解決方法
方法 進行 二進制 error ble url src 是否 cat 在部署tomcat的環境搞JDK的時候出現這個問題。分享一下。 解壓命令:tar -zvxf memcached-1.4.34.tar.gz 遇到了一個問題, gzip: stdin: not
Version 1.7.0_80 of the JVM is not suitable for this product.Version: 1.8 or greater is required.
2種 方法 mar 技術 bin 啟動 product 分享圖片 1.7 Eclipse啟動失敗,設置eclipse啟動jdk有2種方法 第一種: 直接安裝eclipse對應的jdk版本,並設置環境變量 第二種: 修改eclipse配置文件eclipse.ini
Version 1.5 of the JVM is not suitable for this product.Version:1.6 or greater is required
近期在公司涉及到了伺服器等的擴充套件,smartfoxserver擴充套件使用的Eclipse,儘管沒學過java。可是咱畢竟是C++起價的,其它語言看看也就會了,專案依然做著,近期看到某同學有一些java的問題,小問題就隨便在公司幫忙攻克了下,只是後來有個專案發現有些麻煩,準備下班後再看
解決IDEA中的operator is not allowed for source level below 1.7
<>operator is not allowed for source level below 1.7 不難看出報錯的原因是編譯版本低於1.7時,’<>’這種省略型別的泛型語法不可用。 搜尋該錯誤,得到的答案大約為兩種: 大部分複製貼上的答案都是在ecl
Version 當前jdk版本號 of the JVM is not suitable for the this product.Version:1.8 or greater is required
eclipse對應的jdk版本打不開 解決辦法一:可以更改jdk版本。 解決辦法二:我們要知道 JRE是java執行時環境,包含了java虛擬機器,java基礎類庫。是使用java
解決VERSION 1.7 OF THE JVM IS NOT SUITABLE FOR THIS PRODUCT.
在新環境安裝eclipse時有時候會出現 “version 1.7 of the jvm is not suitable for this product. version 1.8 greater is required for eclipse”的問題. 導致eclipse
idea javaweb專案 jsp頁面報錯:''operator is not allowed for source level below 1.7
今天在使用idea做練習時,某個jsp頁面報錯如下: '<>'operator is not allowed for source level below 1.7 出錯程式碼如下:
再用環信sdk註冊時返回錯誤碼-1(appkey is not set)
在註冊時呼叫方法 EMChatManager.getInstance().createAccountOnServer(username, pwd); 時鋪到了異常 Toast.makeText(getApplicationContext(), "註冊失敗: " + e
delphi 10.1編譯專案的時候出現MSBuildToolsPath is not specified for the ToolsVersion解決辦法
今天在使用delphi 10.1編譯專案的時候出現MSBuildToolsPath is not specified for the ToolsVersion "14.0" defined at
C++編譯程式碼的時候提示‘getInstance’ is not a member of ‘A’ A& a = A::getInstance();解決辦法
今天搞C++類模板的時候,寫個例項,發現提示下面的錯誤 ‘getInstance’ is not a member of ‘A’ A& a = A::getInstance(); 程式碼: class A { public:
jQuery 1.9 .live() is not a function
jquery中的live()方法在jquery1.9及以上的版本中已被廢棄了,如果使用,會丟擲TypeError: $(...).live is not a function錯誤。解決方法: 之前的用法:.live(events, function) 新方法: .on(
在Eclipse上除錯C++程式報錯:x86-64 is not compatible with target architecture i386.
背景: 在windows上使用Eclipse上除錯C++程式。 程式出錯如下: warning: `/cygdrive/c/Windows/SYSTEM32/ntdll.dll': Shared library architecture i386:x86-64 is n